is it possible to use readline twotimes? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 2

is it possible to use readline twotimes?

int age = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("You are {0} years old", age); string gender = Console.ReadLine()); Console.WriteLine("your gender is {0}",gender); its not working. give me reason pls. thank you.

19th Oct 2016, 2:11 AM
samooel Hwang
samooel Hwang - avatar
3 Réponses
+ 3
Hi, remove the extra ")" in the 2nd statemet, (); instead of ()); * you can use ReadLine as many times as you want.
19th Oct 2016, 4:35 AM
Naji El Kotob
+ 1
thank you
19th Oct 2016, 4:39 AM
samooel Hwang
samooel Hwang - avatar
- 2
its so hard
20th Oct 2016, 5:23 AM
Mr Soo
Mr Soo - avatar