Trying a bit of code that I obviously don't fully understand...Feedback plz? Im just trying to have a counting program that uses user input. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Trying a bit of code that I obviously don't fully understand...Feedback plz? Im just trying to have a counting program that uses user input.

class MainClass { static void Main() { Console.WriteLine ("Count To: "); int x = Console.Read(); for(i = 0; i <= x; i++) { Console.WriteLine(i); } } }

27th Jul 2016, 6:18 AM
Dakota Lewis
Dakota Lewis - avatar
2 Answers
+ 2
int x = int.Parse(Console.Readline()); oh, you did it... um OK 😜
28th Jul 2016, 6:59 AM
Julio González
Julio González - avatar
+ 1
A little bit of youtube on user input and I figured it out...thx anyway
27th Jul 2016, 3:49 PM
Dakota Lewis
Dakota Lewis - avatar