Console.ReadLine() | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Console.ReadLine()

what is the Correct code instead of the code given below: string y; string x; Console.WriteLine; Console.Readline; y= Console.Readline x=12 x=x+y Console.WriteLine(x)

6th Jun 2017, 2:06 PM
Surendra Rajawat
Surendra Rajawat - avatar
4 Answers
+ 3
int x; int y; Console.WriteLine ("enter the no:"); y=Convert.ToInt32 (Console.ReadLine ()); x=12; x=x+y; Console.WriteLine (x); got it??
6th Jun 2017, 5:16 PM
khadeeja Shamna
khadeeja Shamna - avatar
+ 6
int x; int y; Console.WriteLine ("enter the no:"); y=Convert.ToInt32 (Console.ReadLine ()); x=12; x=x+y; Console.WriteLine (x); // check this
6th Jun 2017, 2:35 PM
khadeeja Shamna
khadeeja Shamna - avatar
+ 3
why you use x integer has string???
6th Jun 2017, 2:32 PM
khadeeja Shamna
khadeeja Shamna - avatar
+ 1
it isn't asking me for input
6th Jun 2017, 4:07 PM
Surendra Rajawat
Surendra Rajawat - avatar