# Thread: C programming Task to calculate the average grades

1. ## C programming Task to calculate the average grades

hello .. can any one help me to solve this problem in c programing please

You have to prepare the algorithm for the application.
Your application should do the following:

1) Read the first name, last name, and four exam grades for each student from the input file “input_File.txt”.

2) Calculate the average grade for each student.

3) Find the corresponding letter grade as per the calculated average as the following.

a. From 90 to 100: A
b. From 80 to 89.9: B
c. From 70 to 79.9: C
d. From 60 to 69.9: D
e. From 50 to 59.9: F
f. Below 50: U

4) Output the students’ first name, last name, average score, and corresponding letter grade in the output file “output_File.txt”.

The program’s input will look like the following (for example):

Ali Ahmad 78.3 67.2 72.6 65.2
Sami Ashraf 45.2 69.6 60.5 71.1
Mona Abdelghani 98.4 41.2 88.3 90.4
Samah Mohammad 76.8 74.2 66.8 79.1
Salem Hani 89.8 84.2 87.5 81.9
Arwa Farid 55.5 58.4 59.3 52.2
Salah Naser 97.2 94.1 92.1 91.5

6) The output for this input file should be as the following

Ali Ahmad Average: 70.82 Grade: C
Sami Ashraf Average: 61.60 Grade: D
Mona Abdelghani Average: 79.58 Grade: C
Samah Mohammad Average: 74.22 Grade: C
Salem Hani Average: 85.85 Grade: B
Arwa Farid Average: 56.35 Grade: F
Salah Naser Average: 93.72 Grade: A

2. So what do you need help with?

We're here to guide you, not do your work for you.
You need to show us what you can achieve by yourself, then we advise on how to fix, improve and move forward.

> Salem Hani Average: 85.85 Grade: B
Salem always gets A's.

Popular pages Recent additions