Submitted by: Submitted by devo232008
Views: 136
Words: 638
Pages: 3
Category: Science and Technology
Date Submitted: 12/04/2014 12:24 AM
Professor: Clarence Huff
Date/Semester: November 22nd Fall 2014
Program Description
This program will allow a user to enter student names and final grades (e.g. A,B,C,D,F) from their courses. We will not know how many students need to be entered. We also will not know how many courses each of the students completed. I am designing my program to calculate the Grade Point Average (GPA) for each student based on each of their final grades. The program will output the Student name along with the GPA.
Analysis
I made this program by simply calculating total score divide by total subjects
Required Input:
1 .Every student detail should be in one line and each student name must end with semicolon(:)
2. Grade of student has to be specified after semicolon in any format.
3. After all calculation type hyphen(-). That will work as end of data.
Output:
1. Output of every student will print in new line
Variable names:
1. Char s[]: that will take the input string.
2. Char name[]: that will store the student name.
3. Total: storing the total score of student.
4. Totalsubjects: that will store the total subjects of student.
Calculation and formulas:
1. To calculate total score : total+=āEā-grade;
2. To calculate average: total/totalsubjects
My program will run until s[0] is not equal to hyphen(-). I am using the gets function to take information of student that take full line as input so by this I can get the GPA of any number of subjects.
ā
Test Plan
Test Plan Number Student and Corresponding Grades Expected GPA Output
1 Achilles: A, D, B, C 2.500000
2 Aphrodite: A, A, A, B, B 3.600000
3 Ares: A, A, A, A, B 2.800000
4 Apollo: B, B 3.000000
5 Athena: A 4.000000
6 Poseidon: A, B, A 3.666667
7 Hermes: A, F, C 2.000000
8 Hades: C, F, D 1.000000
9 Zeus: A, C 3.000000
10 Demeter: B, C 2.500000
Flow Chart
ā
Pseudo Code C Code
Do while 1=1
Take input from user in s
If input is student...