4. Task 3: Reading and Writing a File Write a C program that will get 10 grades of the student from a file named grades.txt. The program will check each grade if its passing, failing or invalid....


4. Task 3: Reading and Writing a File



Write a C program that will get 10 grades of the student from a file named grades.txt. The program will check each grade if its passing, failing or invalid. Passing grade is 70-100. Failing grade is 0-69. Other value will be considered invalid. Store all the passing grade to an output file named passed.txt. Store all the failing grades to an output file named failed.txt. And store all the invalid grades to another output file named invalid.txt. The program must comply with the given sample output below:



NOTE:

Filename to read: grades.txt
Filename to write: passed.txt, failed.txt, invalid.txt


NOTE:

Your source code must display any of the given sample output below.
It means your source code should be flexible enough to meet any of the given sample output.
Your source code output must be identical to any of the given sample output.
It means you have to strictly follow what are the displayed text, labels, casing of characters in the sample output.
Strictly follow the naming of file.


































Sample OUTPUT1:
Enter File Name: grades.txt
All grades are evaluated and stored in their respective files.
DISPLAY FILE MENU
[1] Passing
[2] Failing
[3] Invalid
Option: 1
Passing Grades: 100, 90, 70, 99,


































Sample OUTPUT2:
Enter File Name: grades.txt
All grades are evaluated and stored in their respective files.
DISPLAY FILE MENU
[1] Passing
[2] Failing
[3] Invalid
Option: 2
Failing Grades: 50, 0, 69, 1,


































Sample OUTPUT3:
Enter File Name: grades.txt
All grades are evaluated and stored in their respective files.
DISPLAY FILE MENU
[1] Passing
[2] Failing
[3] Invalid
Option: 3
Invalid Grades: 101, -1,


































Sample OUTPUT4:
Enter File Name: grades.txt
All grades are evaluated and stored in their respective files.
DISPLAY FILE MENU
[1] Passing
[2] Failing
[3] Invalid
Option: 4
Invalid Option
















Sample OUTPUT5:
Enter File Name: grade.txt
The file can’t be open. File does not exists.


Codio<br>Project<br>File<br>Edit<br>Find<br>Tools<br>Education<br>Help<br>> Project Index (static)<br>O Debug Current File<br>View<br>A Compile & Run<br>GMENDOZA83<br>task3.c<br>4. Task 3: Re..<br>+<br>1<br>Your code goes here...<br>Collapse<br>4. Task 3: Reading and Writing a File<br>Write a C program that will get 10 grades of the<br>student from a file named grades.txt. The<br>program will check each grade if its passing,<br>failing or invalid. Passing grade is 70-100. Failing<br>grade is 0-69. Other value will be considered<br>invalid. Store all the passing grade to an output<br>file named passed.txt. Store all the failing grades<br>to an output file named failed.txt. And store all<br>the invalid grades to another output file named<br>invalid.txt. The program must comply with the<br>given sample output below:<br>NOTE:<br>Filename to read: grades.txt<br>Filename to write: passed.txt, failed.txt, invalid.txt<br>NOTE:<br>Your source code must display any of the given sample output below.<br>It means your source code should be flexible enough to meet any of the given sample<br>output.<br>Your source code output must be identical to any of the given sample output.<br>100% (1:0)<br>

Extracted text: Codio Project File Edit Find Tools Education Help > Project Index (static) O Debug Current File View A Compile & Run GMENDOZA83 task3.c 4. Task 3: Re.. + 1 Your code goes here... Collapse 4. Task 3: Reading and Writing a File Write a C program that will get 10 grades of the student from a file named grades.txt. The program will check each grade if its passing, failing or invalid. Passing grade is 70-100. Failing grade is 0-69. Other value will be considered invalid. Store all the passing grade to an output file named passed.txt. Store all the failing grades to an output file named failed.txt. And store all the invalid grades to another output file named invalid.txt. The program must comply with the given sample output below: NOTE: Filename to read: grades.txt Filename to write: passed.txt, failed.txt, invalid.txt NOTE: Your source code must display any of the given sample output below. It means your source code should be flexible enough to meet any of the given sample output. Your source code output must be identical to any of the given sample output. 100% (1:0)
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here