![](https://img.haomeiwen.com/i8617976/9a02e7ff1b028472.png)
![](https://img.haomeiwen.com/i8617976/b67df816be209776.png)
Random random = new Random();
int[] arrs = new int[100];
int index = 0;
int sum = 0;
do
{
arrs[index] = random.Next(0, 1000);
Console.WriteLine(arrs[index]);
sum += arrs[index];
if ((index + 1) % 10 == 0)
{
Console.WriteLine("sum= " + sum);
sum = 0;
}
index++;
} while (index < arrs.Length);
网友评论