Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
26
Task/Loops-Nested/C-sharp/loops-nested-1.cs
Normal file
26
Task/Loops-Nested/C-sharp/loops-nested-1.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
|
||||
class Program {
|
||||
static void Main(string[] args) {
|
||||
int[,] a = new int[10, 10];
|
||||
Random r = new Random();
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
for (int j = 0; j < 10; j++) {
|
||||
a[i, j] = r.Next(0, 21) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
for (int j = 0; j < 10; j++) {
|
||||
Console.Write(" {0}", a[i, j]);
|
||||
if (a[i, j] == 20) {
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
Console.WriteLine();
|
||||
}
|
||||
Done:
|
||||
Console.WriteLine();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue