
Elliot W. answered 09/22/20
Experienced and Successful C Tutor
Hi Maya,
I will do my best to explain line-by-line. I hope you find this helpful.
Maya P.
asked 09/22/20Hi!
I have found this code in the internet:
for (int i = 1; i< 10; i++)
{
for(int j= 1; j<= i; j++)
{
Console.Write(i);
}
Console.WriteLine();
}
Console.ReadKey();
This code is used to display a pyramid like this:
1
22
333
4444
55555
666666
7777777
88888888
999999999
But I do not understand the code? Can someone please simplify and explain what it means?
Thankful for your help!
Elliot W. answered 09/22/20
Experienced and Successful C Tutor
Hi Maya,
I will do my best to explain line-by-line. I hope you find this helpful.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Maya P.
Amazing thanks!09/23/20