Sunday, September 23, 2012

Program 6 Display Month Name


#include<stdio.h>
#include<conio.h>
void main()
{
int m;
clrscr();
printf("enter number of a month");
scanf("%d",&m);


switch(m)
{
case 1:
printf("january");
break;
case 2:
printf("february");
break;
case 3:
printf("march");
break;
case 4:
printf("April");
break;
case 5:
printf("May");
break;
case 6:
printf("june");
break;
case 7:
printf("july");
break;
case 8:
printf("Augest");
break;
case 9:
printf("september");
break;
case 10:
printf("Octomber");
break;
case 11:
printf("navember");
break;
case 12:
printf("desember");
break;
default:
printf("unvalid choise");
}
getch();
}

No comments:

Post a Comment