Declare a Boolean variable named passwordValid. Use passwordValid to output "Valid" if keyStr contains no more than 5 digits and keyStr's length is greater than or equal to 5, and "Invalid" otherwise.
Ex: If the input is 79286, then the output is:
Valid
Ex: If the input is 6F5h, then the output is:
Invalid
Note: isdigit() returns true if a character is a digit, and false otherwise. Ex: isdigit('8') returns true. isdigit('a') false.
PLEASE HELP IN C++