在VC++输入一个数,根据判断输出他的等级a,b,c,d的程序代码
#include <iostream.h>
#include "Grade.h"
int main()
{
int grade,score,a,b,c,d;
cout<<"请输入分数";
cin>>score;
grade=getGrade(score,a,b,c,d);
cout<<grade;
return 0;
}
char getGrade(int score,int a,int b,int c,int d)
{
if(score>=100)
{
return 'a';
}
else if(score>=80)
{
return 'b';
}
else if(score>=60)
{
return 'c';
}
else return 'd';
}
char getGrade(int score,int a,int b,int c,int d);
这是我写的代码 但输出的是abcd的ASCII码