Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
22nd HW Switchv1.0
//gcc 5.4.0 #include <stdio.h> #include <ctype.h> int main(void) { char myChar; printf("Please enter a single Character:\n"); scanf("%c\n",&myChar); printf("The entered character is:%c\n", myChar); if(isspace(myChar)) { myChar=1; } else if (ispunct(myChar)) { myChar=2; } else if (iscntrl(myChar)) { myChar=3; } else if (isalnum(myChar)) { if (isdigit(myChar)) { myChar=4; } else if (islower(myChar)) { myChar=5; } else { myChar=6; } } switch(myChar) { case 1: printf("You have entered a space character\n"); break; case 2: printf("You have entered a punctuation character\n"); break; case 3: printf("You have entered a control character.\n"); break; case 4: printf("You have entered an alphanumeric character AND your character is a digit\n"); break; case 5: printf("You have entered an alphanumeric character AND your character is an lower case alphabetic character"); break; default: printf("You have entered an alphanumeric character AND your character is an Upper case alphabetic character"); break; } return 0; } //islower(myChar)
run
|
edit
|
history
|
help
0
a>=0 && b>=a
merge two dice clay to head sport green globe attacked me seven of prime minister fired
first C code
ctest
120465-11.1-3E
Lab 7 blackjack v1.0
Project 3 Part 1 v1.6
ptr_to_ptr
fibonacci2
Présentation