#include <iostream>
using namespace std;
class myStudent{
public:
void main_menu(){
cout<<"-----Result sheet generator----"<<endl;
cout<<" [1]Add new student"<<endl;
cout<<" [2]Add new student marks"<<endl;
cout<<" [1]Print grade sheet"<<endl;
cout<<" [5]Exit"<<endl;
}
void add_new_marks(){
int i=0;
int marks[i];
char grade;
for(i=0;i<=30;i++){
cout<<"enter student marks"<<endl;
for(i=1;i<=30;i++)
{
cout<<"Enter students marks"<<endl;
cin>>marks[i];
if (marks[i]>70 &&marks[i]<=100)
{
grade='A';
}
if (marks[i]>60 &&marks[i]<=69)
{
grade='B';
}
if (marks[i]>50 &&marks[i]<=59)
{
grade='C';
}
if (marks[i]>40 &&marks[i]<=49)
{
grade='D';
}
if (marks[i]>0 &&marks[i]<=39)
{
grade='F';
}
}
}
};
int main()
{
myStudent s;
s.main_menu();
s.add_new_marks();
return 0;
}
};
Comments
Leave a comment