求大侠帮忙运行下看错在哪里
题目大意:奖学金按一定规则计算#include<iostream.h>
using namespace std;
class student
{
private:
char name[100];
int mon;
bool cader;
bool wes;
int gra1;
int gra2;
int 易做图;
public:
int award();
void getinformation();
const void output();
}
const void student::output()
{
cout<<name<<endl;
cout<<mon<<endl;
}
void student::getinformation()
{
cin>>name>>gra1>>gra2>>cader>>wes>>易做图;
}
int student::award()
{
mon=0;
if(gra1>=80&&易做图)
mon=mon+8000;
if(gra1>=85&&gra2>=82)
mon=mon+4000;
if(gra1>=90)
mon=mon+2000;
if(gra1>=85&&wes)
mon=mon+1000;
if(gra1>=80&&cader)
mon=mon+850;
return mon;
}
int main()
{
student s[100];
int total=0, max=0,n,count=0;
cout<<"输入测试组数n:"<<endl;
cin>>n;
cout<<"依次输入姓名,期末成绩,评议成绩,是否为半干部(1代表是),是否为西部学生(1代表是),发表论文数:"<<endl;
cout<<"输入end已结束输入"<<endl;
for(int i=0;i<n;i++)
{
s[i].getinformation();
total=total+ s[i].award();
if(s[i].award()>max)
{ max=s[i].award();
count=i;}
}
s[count].output();
cout<<endl;
cout<<total<<endl;
getchar();
getchar();
return 0;
}
--------------------编程问答-------------------- 这里是c#…… --------------------编程问答--------------------
--------------------编程问答-------------------- class结尾要加 分号,除了这个语法错误, 其他的逻辑错误,你自己调试吧,这个以后也别问大家
class student
{
private:
char name[100];
int mon;
bool cader;
bool wes;
int gra1;
int gra2;
int 易做图;
public:
int award();
void getinformation();
const void output();
};
//类定义后面要加分号的
补充:.NET技术 , C#