#include <iostream>
using namespace std;
struct Studentrecord
{
int student_number;
int s_1,s_2,s_m,s_t;
char grade;
};
void get_input(Studentrecord& the_student);
double score(Studentrecord& thestudent);
char grade(double score);
void get_input(Studentrecord the_student)
{
cout<<"-------------"<<endl;
cin>>Studentrecord.student_number;
cout<<"-------------"<<endl;
cin>>Studentrecord.s_1;
cout<<"-------------"<<endl;
cin>>Studentrecord.s_2;
cout<<"-------------"<<endl;
cin>>Studentrecord.s_m;
cout<<"-------------"<<endl;
cin>>Studentrecord.s_t;
}
double score(Studentrecord& thestudent)
{
int rate1=50,rate2=25;
double percent1,percent2;
percent1=rate1/100;
percent2=rate2/100;
return(score=(Studentrecord.s_t)*percent1+(Studentrecord.s_m)*percent2+(Studentrecord.s_1+Studentrecord.s_2)*5*percent2);
}
char grade(double score)
{
if(score>=90) return 'A';
else if(score>=80) return 'B';
else if(score>=70) return 'C';
else if(score>=60) return 'D';
else return 'F';
}
int main()
{
Studentrecord student;
char ans;
do
{
get_input(student);
score1=score(student);
grade1=grade(score);
cout<<score1<<endl;
cout<<grade1<<endl;
cin>>ans;
}while(ans=='y'||ans=='Y');
return 0;
}