using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Drawing.Drawing2D; namespace MyFirstProject { public partial class Drows : Form { public Drows() { InitializeComponent(); } private void Drows_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { //动态画饼形图 int[] arr = new int[] { 5, 4, 7, 6, 3, 2, 7, 9, 3 }; int sum = 0;//总数 float num = 0;//度数 foreach (int i in arr) { sum += i; //求和 } Random Ra = new Random(); for (int i = 0; i < arr.Length; i++) {