The way you did your for loops makes me think you may not understand the syntax. If so, let me know and i'll clarify for you.
All you need to do is embed one for loop into the other. Take a look at the values of i and totalcounter once the program is done running. the total number of times i runs is 20 as described when m runs 2 times.
for (int m = 0; m < 2; m++)
{
for (int i = 0; i < 10; i++)
{
Console.WriteLine("i count: {0}",i);
Console.WriteLine("totalcounter count: {0}", totalcounter);
totalcounter += 1;
}
}
Sample output
i count: 0
totalcounter count: 1
i count: 1
totalcounter count: 2
i count: 2
totalcounter count: 3
i count: 3
totalcounter count: 4
i count: 4
totalcounter count: 5
i count: 5
totalcounter count: 6
i count: 6
totalcounter count: 7
i count: 7
totalcounter count: 8
i count: 8
totalcounter count: 9
i count: 9
totalcounter count: 10
i count: 0
totalcounter count: 11
i count: 1
totalcounter count: 12
i count: 2
totalcounter count: 13
i count: 3
totalcounter count: 14
i count: 4
totalcounter count: 15
i count: 5
totalcounter count: 16
i count: 6
totalcounter count: 17
i count: 7
totalcounter count: 18
i count: 8
totalcounter count: 19
i count: 9
totalcounter count: 20