+ 1

I modified the code on this example for the use of "?" in C#, somethings wrong.

Why doesnt it say 'Sorry' when I enter a number less than 18? https://code.sololearn.com/cWt3l0CF90ja/?ref=app

9th Jul 2021, 3:10 PM
Moon
Moon - avatar
1 Odpowiedź
+ 5
Use .ReadLine() to get <age>, not .Read(). .Read accepts character, and being converted to integer, the value will be the respective character's ASCII value.
9th Jul 2021, 3:21 PM
Ipang