0
I don't understand why my code exits my for loop after assigning x a value of 0 can someone please explain
I don't get why it enters the loop assigns x then exists the loop. https://code.sololearn.com/cChESHnuQk2o/?ref=app I'm working on pc only asking here so this is occurring on pc.
1 Réponse
0
I noticed that you're using loop in case to iterate through UserInput. I don't know how, but SoloLearn seems preventing show the input windows more than one
So right at the first iteration, it break out from the loops and getting an output
Instead, if you want more than one input, try to seperate the input with line break
e.x:
x = Convert.ToInt32(Console.ReadLine());
y = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(x+y);
Input your value:
3
5
Output:
8