Hello,
The first part of my assignment asks me to write a program that takes 3 integers from 0-100 input in any order and outputs them shown smallest to largest.
I have the general body of the code down but I am having trouble with input validation. I am want to utilize cin.fail(), cin.clear(), and cin.ignore() to only allow inputs that are integers between 0-100.
I have it such that it fails when letters are entered but when it fails (for instance if I enter letter a) it prints out "Please enter an integer between 0 and 100In ascending order, the numbers are:"
when it should just say "Please enter an integer between 0 and 100".
I am not entirely sure how all the parts of this cin.fail() bit work. Any help appreciated. I am sorry this question is somewhat vague but I dont know the language enough to get more specific. Thanks.