Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Lab 5 HW Spring 2017 v0.5
//gcc 5.4.0 #include <stdio.h> #include <ctype.h> //Start Program //Char a; //Int x; //If a is letter //If a is a vowel //X=2 //If a is a consonet // X=1 //Else if a is a digit // X=3 // Else if a is a special character // X=4 // Else X=5 //Switch (x) // Case 1: // Print character is a consonant // Break; // Case 2: // PRINT character is a vowel // Break; // Case 3: // Print Character is a digit // Break; // Case 4: // Print Character is a symbol // Break; // Default: // PRINT Character cannot be read //End Program int main(void){ char a; int x; if(isalnum(a)){ If(a==A||a==a||a==e||a==E||a==I||a==i||a==O||a==o||a==U||a==u||a==Y||a==y){ X=2; else if(isdigit(a)) X=3; else X=1; } if(ispunct(a)) X=4; else X=5; Switch (x){ Case 1: printf("character is a consonant"); Break; Case 2: printf("character is a vowel"); Break; Case 3: printf("Character is a digit"); Break; Case 4: printf("Character is a symbol"); Break; Default: printf("Character cannot be read"); Break; } }
run
|
edit
|
history
|
help
0
Project 5 v.02
qsort
pllkkj
recurs3
a3
-Wall
modify char by mem addr
Project 5 v0.11
MATRIZ DE CADENAS
T3.C