| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 542 人关注过本帖
标题:看我写的程序
取消只看楼主 加入收藏
hanshengchua
Rank: 1
等 级:禁止访问
威 望:2
帖 子:174
专家分:0
注 册:2006-5-8
收藏
 问题点数:0 回复次数:0 
看我写的程序
#include <iostream>
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;
}
编译的时候有错误,哪里出错了???
2006-05-09 22:47
快速回复:看我写的程序
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016543 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved