Description:
This program show february month as in calender automatically.
CODE:
This program show february month as in calender automatically.
CODE:
#include<iostream>
#include<conio.h>
#include<iomanip>
using namespace std;
int main()
{int i,j,k=6;
cout<<setw(20)<<"Feb 2012"<<endl;
cout<<endl;
cout<<setw(5)<<"MO"<<setw(5)<<"TU"<<setw(5)<<"W"<<setw(5);
cout<<"TH"<<setw(5)<<"Fr"<<setw(5)<<"Sa"<<setw(5)<<"Su"<<endl;
cout<<setw(5)<<"30";
cout<<setw(5)<<"31";
for(i=1;i<=5;i++)
cout<<setw(5)<<i;
cout<<endl;
for(i=0;i<3;i++)
{for(j=0;j<7;j++)
{
cout<<setw(5)<<k;
k++;
}
cout<<endl;
}
for(i=27;i<30;i++)
cout<<setw(5)<<i;
cout<<endl;
cout<<endl;
cout<<" **** Hafiz Junaid Hassan ****"<<endl;
cout<<setw(5)<<" 11-TE-14 ";
getche();
return 0;
}
No comments:
Post a Comment