Hello i been doing some program of my own, my program is to get the number of days paased in the year. I am having hard to get get the passed in the year. Now when i try to run and the output gives me "4438232", i am really having hard time to get this right..
For example if the user enters (mm-dd-yy) 3-18-2013, then the reamaing days passed in the year is 77.
`
void dateType::Num_DayPassed()
{
int sum;
int yy = 365;
if (month ==1)
{
cout<<"Number of days Passed in the Year: "<<sum<<endl;
day=31;
sum=day-yy;
}
else if (month==2)
{
cout<<"Number of days Passed in the Year: "<<sum<<endl;
day=60;
sum=day-yy;
}
else if (month==3)
{
cout<<"Number of days Passed in the Year: "<<sum<<endl;
day=91;
sum=day-yy;
}
else if (month==4)
{
cout<<"Number of days Passed in the Year: "<<sum<<endl;
day=121;
sum=day-yy;
}
else if (month==5)
{
cout<<"Number of days Passed in the Year: "<<sum<<endl;
day=152;
sum=day-yy;
}
else if (month==6)
{
cout<<"Number of days Passed in the Year: "<<sum<<endl;
day=182;
sum=day-yy;
}
else if (month==7)
{
cout<<"Number of days Passed in the Year: "<<sum<<endl;
day=213;
sum=day-yy;
}
else if (month==8)
{
cout<<"Number of days Passed in the Year: "<<sum<<endl;
day=244;
sum=day-yy;
}
else if (month==9)
{
cout<<"Number of days Passed in the Year: "<<sum<<endl;
day=274;
sum=day-yy;
}
else if (month==10)
{
cout<<"Number of days Passed in the Year: "<<sum<<endl;
day=305;
sum=day-yy;
}
else if (month==11)
{
cout<<"Number of days Passed in the Year: "<<sum<<endl;
day=335;
sum=day-yy;
}
else if (month==12)
{
cout<<"Number of days Passed in the Year: "<<sum<<endl;
day=366;
sum=day-yy;
}
}
`