-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSwithch_case.c
More file actions
49 lines (46 loc) · 891 Bytes
/
Swithch_case.c
File metadata and controls
49 lines (46 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include<stdio.h>
int main() {
//instance...
char alp;
//taking input using scanf..
printf("Enter an Alphabet: ");
scanf("%c",&alp);
//this code is an example of switch-case branching..
//we are taking am aplphabet and checking that if it is a vowel or not..
switch(alp) {
case 'a':
printf("Vowel.");
break;
case 'e':
printf("Vowel.");
break;
case 'i':
printf("vowel");
break;
case 'o':
printf("Vowel.");
break;
case 'u':
printf("Vowel.");
break;
case 'A':
printf("Vowel.");
break;
case 'E':
printf("Vowel.");
break;
case 'I':
printf("Vowel.");
break;
case 'O':
printf("Vowel.");
break;
case 'U':
printf("Vowel.");
break;
default:
printf("Consonant.");
break;
}
return 0;
}