hello everyone...
I have instructed to create a Grading system that covers following grading period and computation:
I'm trouble making the sum of the Prelim 30%, Midterm 30%, Final 40% average to get the total average 100%.
int AppendFile();
int BrowseFile();
int FindRecord();
int ViewProfile();
int Start();
int Back();
int Prelim();
int Midterm();
int Final();
int Subfind();
int main()
{
system ("color 5F");
system ("cls");
cout << "\t==============================================================" << endl;
cout << "\t| NORTHERN COLLEGE OF INFORMATION TECHNOLOGY AND COMPUTING |" << endl;
cout << "\t==============================================================" << endl << endl;
Start();
getch();
}
int Start()
{
int choice;
back:
cout<<" NCITC Grade Portal :"<<endl;
cout<<"\t[1] Append Record "<<endl;
cout<<"\t[2] Browse all file contents "<<endl;
cout<<"\t[3] Find a record "<<endl;
cout<<"\t[4] Exit "<<endl;
cout<<"\t[5] About \n"<<endl;
cin>>choice;
switch (choice)
{
case 1:
system("cls");
AppendFile();
Back();
break;
case 2:
system("cls");
BrowseFile();
Back();
break;
case 3:
system("cls");
FindRecord();
Back();
break;
case 4:
system("cls");
cout<<" Thank you . . .";
break;
case 5:
system("cls");
ViewProfile();
break;
default:
cout<<"Invalid Entry ! . . . Try Again . . .\n";
system("cls");
break;
goto back;
system("cls");
}
}
int AppendFile()
{
string id , firstname , lastname;
ofstream myfile;
myfile.open ("NCITC.txt");
cout<<" Student ID : ";
cin>> id;
cout<<"\n Student Name : ";
cin>>firstname>>lastname;
Prelim();
Midterm();
Final();
for(int prelim=0 ;prelim < 1 ; prelim++)
{
cout<<"\n Enter the marks obtained by student in [Prelim] :"<<endl;
cout<<"\n\t Attendance/Assignment 10% (No. of Presence in 30 days)= ";
cin>>marks[prelim][0];
cout<<"\n\t SW/Labe Exercises 20% (total of 100)= ";
cin>>marks[prelim][1];
cout<<"\n\t Quizzes 30% (total of 150)= ";
cin>>marks[prelim][2];
for(int midterm=0 ;midterm < 1 ; midterm++)
{
cout<<"\n Enter the marks obtained by student in [Midterm] :"<<endl;
cout<<"\n\t Attendance/Assignment 10% (No. of Presence in 30 days)= ";
cin>>marks[midterm][0];
cout<<"\n\t SW/Labe Exercises 20% (total of 100)= ";
cin>>marks[midterm][1];
cout<<"\n\t Quizzes 30% (total of 150)= ";
cin>>marks[midterm][2];
for(int final=0 ;final < 1 ; final++)
{
cout<<"\n Enter the marks obtained by student in [Final] :"<<endl;
cout<<"\n\t Attendance/Assignment 10% (No. of Presence in 30 days)= ";
cin>>marks[final][0];
cout<<"\n\t SW/Labe Exercises 20% (total of 100)= ";
cin>>marks[final][1];
cout<<"\n\t Quizzes 30% (total of 150)= ";
cin>>marks[final][2];