You are on page 1of 2

WAP to input a no from user from 1 to 12 show

the corresponding month and days of the


month
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
int m;
cout<<"enter a number between 1 to 12";
cin>>m;
if(m==1)
cout<<"jaunary=31";
cin>>m;
if(m==2)
cout<<"FEUBARY=28";
if(m==3)
cout<<"MARCH=31";
if(m==4)
cout<<"APRIL=30";
if(m==5)
cout<<"MAY=31";
if(m==6)
cout<<"JUNE=30";
if(m==7)
cout<<"JULY=31";
if(m==8)
cout<<"AUGUST=31";
if(m==9)
cout<<"SEPTEMBER=30";

if(m==10)
cout<<"OCTOBER=31";
if(m==11)
cout<<"NOVEMBER=30";
if(m==12)
cout<<"DECEMBER=31";
getch();
}

You might also like