Write a program to complete the following tasks. Record all results to a data fi
ID: 3759565 • Letter: W
Question
Write a program to complete the following tasks. Record all results to a data file called "GradeSheet.dat".(1) Read the grade sheet from attached data file, "Assignment4.dat". Print the original grade sheet.
(3) Write a module to sort array GRADE[] and print the sorted grade sheet.
(4) Write a module to sort array NAME[] and print the sorted grade sheet.
(5) Write a module to sort array ID[] and print the sorted grade sheet.
(6) Write a module to print the student's id, name, and grade for student with highest grade and with lowest grade, respectively.
(7) Write a module to determine mean of the grades.
(8) Write a module to list students with grade is less than mean.
File for GradeSheet.dat
ID NAME GRADE
5532 Mary 100
7856 Tom 99.56
3345 Cathy 33.78
1229 Jim 89.42
2785 David 67.52
9954 Rob 99.25
2388 Sue 87.29
6523 Michael 60.55
1287 Zach 76.12
2783 Amy 90.55
Explanation / Answer
#include<iostream.h>
1.#include<conio.h>
main()
{
clrscr();
int marks;
char grade;
cout<<" Enter your Marks = ";
cin>>marks;
switch(marks/10)
{
case 10 : grade='A';
break;
case 9 : grade='A';
break;
case 8 : grade='A';
break;
case 7 : grade='B';
break;
case 6 : grade='C';
break;
case 5 : grade='D';
break;
default : grade='F';
}
cout<<" Your Grade is = "<<grade<<endl;
getch();
return 0;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.