1.Write a program that asks the user to enter a character, and then determine whether the character is a digit or an alphabet. Some sample outputs of the program are shown below. You are prohibited from using isdigit() function or isalpha() function from the cctype header file. (Hint: This question tests your understanding of ASCII characters.)
Sample Program Output 1:
Enter a character: q
q is an alphabet.
Sample Program Output 2:
Enter a character: Z
Z is an alphabet.
Sample Program Output 3:
Enter a character: 9
9 is a digit.
2.Write a program that asks the user to enter an integer, and then determine the number of odd and even digits in the integer. Some sample outputs of the program are shown below.
Sample Program Output 1:
Enter an integer: 723819
There are 4 odd digits and 2 even digits.