using namespace std;
class out_month
{
int month;
cout<<"Tell me a month number:";
cin>>month;
void days()
{
if(month<=7&&month!=2)
{
if(month%2==0)
cout<<"Month has 30 days"<<endl;
else
cout<<"Month has 31 days"<<endl;
}
else
{
if(month%2==0&&month!=2)
cout<<"Month has 31 days"<<endl;
else
{
if(month!=2)
cout<<"Month has 30 days"<<endl;
else
cout<<"Month has 28 or 29 days"<<endl;
}
}
}
};
int main()
{
out_month S1;
S1.days();
system("pause");
return 0;
}
编译的时候有错误,哪里出错了???