#include<stdio.h>
#include<conio.h>
void main()
{
int day;
clrscr();
printf("\n Enter day of week as number from 1 to 7");
scanf("%d",&day);
if(day==1)
printf("\n Day of week is Monday");
else if(day==2)
printf("Day of week is Tuesday");
else if(day==3)
printf("Day of week is Wednesday");
else if(day==4)
printf("Day of week is Thursday");
else if(day==5)
printf("Day of week is Friday");
else if(day==6)
printf("Day of week is Saturday");
else if(day==7)
printf("Day of week is Sunday");
else
#include<conio.h>
void main()
{
int day;
clrscr();
printf("\n Enter day of week as number from 1 to 7");
scanf("%d",&day);
if(day==1)
printf("\n Day of week is Monday");
else if(day==2)
printf("Day of week is Tuesday");
else if(day==3)
printf("Day of week is Wednesday");
else if(day==4)
printf("Day of week is Thursday");
else if(day==5)
printf("Day of week is Friday");
else if(day==6)
printf("Day of week is Saturday");
else if(day==7)
printf("Day of week is Sunday");
else
printf("\n Wrong Input");
getch();
}
No comments:
Post a Comment