Friday 4 September 2015

WAP to input a number (1 to 7) and print the weekday name according to the given number.

#include<stdio.h>
#include<conio.h>
void main()
{char a;
printf("enter the letter");
scanf("%c",&a);
switch(a)
{
case 'a':
case 'A':
case 'e':
case 'E':
case 'i':
case 'I':
case 'o':
case 'O':
case 'u':
case 'U':printf("its a vowel");
break;
default:printf("its not a vowel");
}
getch();
}

No comments:

Post a Comment