Alphabet and Digit
Submit solution
C
Points:
10 (partial)
Time limit:
2.0s
Memory limit:
12M
Authors:
Problem type
Allowed languages
Task
To check whether the input given is an alphabet or digit.
Input
Read the input in a new line.
Output
Display the result in the next line.
Sample Input1
N
Sample output1
Alphabet
Sample Input2
9
Sample output2
Digit
Comments
.
hi
include<stdio.h>
int main() { char input; scanf("%c",&input); if(input>='0'&&input<='9') { printf("Digit\n"); } else if((input>= 'a' && input <= 'z')||(input>= 'A' && input<+ 'Z')){ printf("Alphabet\n"); } return 0; }