0

Could someone explain clearly about this?

the output of the codes are different. That is: for(int x=1;x<=5;x++) { for(int y=1;y<=3;y++) { Console. Write("a"); } Console.WriteLine(); } Output : aaa aaa aaa aaa aaa That is 3a and five times loop running But when I put 'x' in inner most loop instead of '1' (int y=x; y<=3; y++) output : aaa aa a The output is different. x also equal to 1, y=x=1.So, why the output is different. That's really make me confuse.

22nd May 2018, 4:57 PM
Mr Thaw
Mr Thaw - avatar
0 odpowiedzi