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
Assignment 3
TopLeftTriangle.c
Stub Program for Problem 3 HW 2
sort_using_pointers.c
Lior Yehieli Lesson
json formatter
CO_assign_q4
Exploiting uninitialized variable
ACCES FUNC
project 5 v.075