(1) Generate a data file to save students\' grade. Allow the user toenter id, na
ID: 3617168 • Letter: #
Question
(1) Generate a data file to save students' grade. Allow the user toenter id, name and grade of each student as well as the totalnumber of students. There should be a header in the first row.Here is an example of the data file.ID NAME GRADE
01 Mary 100.00
02 Tom 98.35
03 John 88.99
......
(2) If the grade is <0 or >100, ask the user to re-enter thecorrect grade.
(3) After the data file is generated, read the file and printthe content to the screen.
The tasks describe above should be completed in one program.
Explanation / Answer
please rate - thanks #include #include #include using namespace std; int main() {int id,count,i; string name; double grade; ifstream in; ofstream out; out.open("output.txt"); coutcount; outRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.