#include<iostream>
using namespace std;
int main()
{
int mnth,week;
cout <<"\n\nEnter number of days in month: ";
cin>>mnth;
cout<<"\n\nEnter starting day of the week(1=Sun, 7=Sat):";
cin>>week;
if(((mnth<28)&&(mnth>31)) && ((week<1)&&(week>7)))
{cout<<"Invalid Input!";
**
else{
cout<<"\nS\tM\tT\tW\tT\tF\tS\n";
for(int j=0;j<7;j++){
if(week != (j+1)){cout<<"\t";**
else{
for(int i=1;i<(8-j);i++){
cout<<i<<"\t";
**
**
**cout<<endl;
****