Why is my programm with int c; c = Convert.ToInt(Console.Read()); Console.Write(c); giving me answer 10 all the time? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
- 1

Why is my programm with int c; c = Convert.ToInt(Console.Read()); Console.Write(c); giving me answer 10 all the time?

17th Nov 2016, 11:20 PM
Dundee77
3 Respostas
0
try Console.ReadLine instead of Console.Read
18th Nov 2016, 7:26 PM
Kamil Kosyl
Kamil Kosyl - avatar
0
I didnt wanted to continue to next line. Won't it jump down?
18th Nov 2016, 8:25 PM
Dundee77
0
try c= Convert.ToInt16(Console.ReadLine());
21st Nov 2016, 1:56 PM
Dimon Nagirniy
Dimon Nagirniy - avatar