摘要: #include using namespace std;struct Date { int year; int month; int day; }; int d[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};int main() { Date date; cout>date.year>>date.month>>date.day; int days=0,i; for(i=1;i=3) days+=1; //闰年的2月要加1天 cout<<date.month<<"月"<&l 阅读全文
posted @ 2013-03-07 22:16 _一千零一夜 阅读(96) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; struct Student { char num[13]; char name[10]; int cpp; int math; int english; int grade; double average; }; const int N=3; int main( ) { int i; Student stu[5]; for(i=0;i>stu[i].num; cin>>stu[i].name; cin>>stu[i].cpp; cin>>stu[i].math; cin>>stu 阅读全文
posted @ 2013-03-07 22:12 _一千零一夜 阅读(121) 评论(0) 推荐(0) 编辑