谁帮我做一道C++编程题,懂得进!在线等!能运行的!
来源:百度知道 编辑:UC知道 时间:2024/06/03 20:29:47
用FOR循环简洁点 还有就是学生的成绩要从键盘输入!!
/**第一个头文件,我的名称是student.h,如果你改的话把#ifndef STUDENT_H
#define STUDENT_H
这两句改一下,希望对你有帮助吧
*/
#ifndef STUDENT_H
#define STUDENT_H
#include<iostream>
#include<cstring>
using namespace std;
class Student
{
public:
Student(int a = 0,char *n = " ",double c = 0,double cn = 0,double m = 0);
static int countOne;
static int countTwo;
static int countThree;
void showAve();
void caculateOne(); //统计一科不及格
void caculateTwo(); //统计二科不及格
void caculateThree(); //统计三科不及格
void inPutData(); //输入学生信息
private:
int age;
char name[7];
double comMetherd; //计算机组成原理
double comNet; //计算机网络
double Multimedia; //多媒体
};
#endif
#include<iostream>
#include<cstring>
#include<string>
#include"student.h"
using namespace std;