//第一个文件 13.h
#include <iostream.h>
#include "13.h"
void main()
{
char strId[30],strName[30];
int intMath,intEnglish,intC;
cout<<"/n输入学生的ID:";
cin>>strId;
cout<<"/n输入学生的姓名:";
cin>>strName;
cout<<"/n输入学生的 [数学] [英语] [C] 的成绩:";
cin>>intMath>>intEnglish>>intC;
student stu;
stu.setId(strId);
stu.setName(strName);
stu.chengji.setmath(intMath);
stu.chengji.setintenglish(intEnglish);
stu.chengji.setc(intC);
cout<<"/n学生 "<<stu.getName()<<" 的ID是:"<<stu.getId()<<" 总成绩: "<<stu.chengji.getSum()<<" 平均成绩: "
<<stu.chengji.getAve()<<endl;
}
//第二个文件 13.cpp
#include <iostream.h>
#include "13.h"
void main()
{
char strId[30],strName[30];
int intMath,intEnglish,intC;
cout<<"/n输入学生的ID:";
cin>>strId;
cout<<"/n输入学生的姓名:";
cin>>strName;
cout<<"/n输入学生的 [数学] [英语] [C] 的成绩:";
cin>>intMath>>intEnglish>>intC;
student stu;
stu.setId(strId);
stu.setName(strName);
stu.chengji.setmath(intMath);
stu.chengji.setintenglish(intEnglish);
stu.chengji.setc(intC);
cout<<"/n学生 "<<stu.getName()<<" 的ID是:"<<stu.getId()<<" 总成绩: "<<stu.chengji.getSum()<<" 平均成绩: "
<<stu.chengji.getAve()<<endl;
}
2652

被折叠的 条评论
为什么被折叠?



