Create a. Program that recognizes letters as errors(or that restricts letters) when input by the user | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Create a. Program that recognizes letters as errors(or that restricts letters) when input by the user

The program shout only accept digits and restrict any letter input...using c++

20th Dec 2021, 11:42 AM
CodeWithDENIS.KšŸ‘©ā€šŸ’»
CodeWithDENIS.KšŸ‘©ā€šŸ’» - avatar
1 Answer
+ 1
You could use a while loop to get input... Here's an example: https://www.delftstack.com/howto/cpp/cpp-input-validation/
20th Dec 2021, 12:56 PM
Lisa
Lisa - avatar