+ 1
'FOR LOOPS' is very stressful
i had a bit of confusion with the for loop which took a few hours to think about. which I finally want to ask you guys. It's hard to explain, so I'll give you an example ; https://code.sololearn.com/cU2zve38sRD2/?ref=app because the discussion feature on sololearn can't reply , so thank you for answering my confusion.
1 Antwort
+ 3
You are writing: "in this case, I want to change only 0 to N"
Use if/else structure, to do something when the condition is true, and do something else otherwise.
for (int i=0; i<4; i++) {
if (i==0) {
Console.WriteLine("N");
} else {
Console.WriteLine(i);
}