C# help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

C# help

Does anyone know how I would ask the user for a integer input and how to store that int as a variable and print what they inputed ?

29th Apr 2018, 9:00 AM
Dom Harris
Dom Harris - avatar
2 Answers
+ 3
int x = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Your input: {0} ", x); //check out the lesson //https://www.sololearn.com/learn/CSharp/2585/?ref=app
29th Apr 2018, 9:50 AM
Goku
Goku - avatar
+ 5
Thank u
29th Apr 2018, 9:52 AM
Dom Harris
Dom Harris - avatar