+ 1

How to keep a user from entering a character or a word for a number (int) input

When you ask a numeric input from a user but he/she enters a word or a letter, how can you print an error message saying you only accept numbers? How do you write that line of code?

25th Jul 2018, 7:12 PM
Cem
Cem - avatar
1 Resposta
25th Jul 2018, 9:41 PM
Hatsy Rei
Hatsy Rei - avatar