Read an integer value. Assume it is the number of a month of the year; print out the name of that month
Here is the c source code for: Read an integer value. Assume it is the number of a month of the year; print out the name of that month
/* a program to enter the number , assume it the monthe of the year and print the corresponding month
programmed by :
Name: Jitendra Yadav */
#include <stdio.h>
#include <conio.h>
void main()
{
int a;
printf(“Enter the number from 1 to 12 “);
scanf(“%d”,&a);
if (a==1)
{
printf(“This is janauary”);
}
else if(a==2)
{
printf(“The month is febuary”);
}
else if(a==3)
{
printf(“The month is March”);
}
else if(a==4)
{
printf(“The month is April”);
}
else if(a==5)
{
printf(“The month is May”);
}
else if(a==6)
{
printf(“The month is June”);
}
else if(a==7)
{
printf(“The month is July”);
}
else if(a==8)
{
printf(“The month is August”);
}
else if(a==9)
{
printf(“The month is September”);
}
else if(a==10)
{
printf(“The month is October”);
}
else if(a==11)
{
printf(“The month is November”);
}
else if(a==12)
{
printf(“The month is December”);
}
else
{
printf(“This is not valid” );
}
getch();
}








