can anyone tell me how to fix this, it needs to print out the calendar for a whole year.
#include<iostream>
#include<iomanip>
int startDay(int year, int calcjan1);
int calcjan1(int year);
void printMonth (int startDay, int days);
int main()
{
char again;
int year=0;
do
{
cout<<"Enter a year for a calendar you would like to view:";
cin>>year;
startDay = calcjan1(year);
for(int month = 1;month<= 12; month++)
days = daysinmonth(month)
printtitle(monthnum,year)
printmonth(startDay,days)
startDay = (startDay + days)%7
cout<<"Would you like to enter another year?: Y to continue";
cin>>Y;
}while (again='Y')
//====================calcjan1===================
//calculates the first day of Jan. for year entered
int calcjan1(int year)
{
year = ((year-1)*365+((year-1)/4)-((year-1)/100)+(((year-1)/400))+)%7
return year;
}//calcjan1
//===============printMonth==============
void printMonth (int startDay, int days)
{
cout<<"Sun Mon Tue Wed Thu Fri Sat\n";
cout<<"--- --- --- --- --- --- ---\n";
for(int skipDay = 0;skipDay < startDay; skipDay++)
cout<<" ";
int weekDay = startDay;
for (int dayCount =1; dayCount <=days; dayCount++)
{
if (weekDay>6)
{
cout<<endl;
weekDay =1;
}
else
weekDay++;
cout<<setw(3) <<dayCount<<" ";
}
cout<<"\n--- --- --- --- --- --- ---\n";
system("Pause");
return;
}