# include %26lt;iostream.h%26gt;
# include %26lt;iomanip.h%26gt;
#include %26lt;ctype.h%26gt; // needed for toupper
#include %26lt;stdlib.h%26gt;// needed for rand
#include %26lt;fstream.h%26gt;
using namespace std;
int main ( )
{
int months[12]={31,28,31,30,31,30,31,31,30,3...
int month[2]={0,0};
int dan[2]={0,0};
int daystart=0;
int munth=0;
int latot=0;
int year=-1;
cout %26lt;%26lt; "Enter starting month #: ";
cin %26gt;%26gt; month[0];
while(month[0]%26lt;0 || month[0]%26gt;12)
{
cout %26lt;%26lt; "Wrong number, try again: ";
cin %26gt;%26gt; month[0];
}
cout %26lt;%26lt; "Enter starting day #: ";
cin %26gt;%26gt; dan[0];
while(dan[0]%26lt;0 || dan[0]%26gt;31)
{
cout %26lt;%26lt; "Wrong number, try again: ";
cin %26gt;%26gt; dan[0];
while (month[0]==2 ||
month[1]==2 %26amp;%26amp; dan[0]%26gt;28)
{
cout %26lt;%26lt; "Wrong number, try again: ";
cin %26gt;%26gt; dan[0];
}
}
cout %26lt;%26lt; "Enter ending month #: ";
cin %26gt;%26gt; month[1];
while(month[1]%26lt;0 || month[1]%26gt;12)
{
cout %26lt;%26lt; "Wrong number, try again: ";
cin %26gt;%26gt; month[1];
}
Help with c++ please?
No.
Do your own homework, or ask a specific question if you are stuck.
800flowers.com
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment