// days in a given month.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char month,january,feburary,march,april,may,june,july,august,september,october,novemb
er,december;
cout<< "\nEnter january,feburary,march,april,may,june,july,august,september,october,november,dec
ember : ";
cin>>month;
switch(month)
{
case january:
cout<< "31\n";
break;
case feburary:
cout<< "28\n";
break;
case march:
cout<< "31\n";
break;
case april:
cout<< "30\n";
break;
case may:
cout<< "31\n";
break;
case june:
cout<< "30\n";
break;
case july:
cout<< "31\n";
break;
case august:
cout<< "31\n";
break;
case september:
cout<< "30\n";
break;
case october:
cout<< "31\n";
break;
case november:
cout<< "30\n";
break;
case december:
cout<< "31\n";
break;
}
return 0;
}
this is wht i attempted lastly...
i have display the respective months with days using switch statement