Grade Point Average- GPA calculator: Write a program that asks the user to enter his letter grade in each course and the number of credits of this course. When the user enters the letter 'N' or 'n' then the program will display the GPA of this student. Your grade point average (GPA) is calculated by dividing the total amount of grade points carmed, by total number of credit hours attempted. GPA total amount of grade points earned/total number of credits Your grade point average may range from 0,0 to a 4.0. Each letter grade is equivalent to a number of "Grade points" (check the below table). Alpha Grade Grade Points 4.0 3.0 C D 2.0 1.0 0.0 F In the below sample runl, the GPA is calculated as follows: GPA = (4.0 3) + (4.0 1)+ (3.0 3) + (1.0 3)+(2.0 3))/(3+1+3+3+3) GPA = 34.0/ 13 = 2.6153846153846154 Sample Run1: Enter Alpha grade and credita N to stop): A 3 Enter Alpha grade and eredits (N to stop): A 1 Enter Alpha grade and credits to stop): B3 Enter Alpha grade and credits (N to stop): D 3 Inter Alpha grade and credits to stop): C3 Using java Enter Alpha grade and credita N to stop): N Your gpa is 2.6153846153846164 Sample Run2: Enter Alpha qrade and credits (N to stop): 33 Enter Alpha gzade and eredits (N to stop): C 3 Enter Alpha grade and eredits (N to stop): F3 Enter Alpha grade and eredita to top): A 1 Enter Alpha grade and eredits (N to stop): # Your gpa is 1.9 Sample Run3: Enter Alpha grade and eredits (N to stop): N No grades entered.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter4: Control Structures I (selection)
Section: Chapter Questions
Problem 19PE: Ron bought several acres of farm to grow and sell vegetables. Suppose that Ron wants to grow a...
icon
Related questions
Question
i need the answer quickly
Grade Point Average- GPA calculator:
Write a program that asks the user to enter his letter grade in each course and the number of credits of
this course. When the user enters the letter 'N' or 'n' then the program will display the GPA of this
student.
Your grade point average (GPA) is calculated by dividing the total amount of grade points carned, by
total number of credit hours attempted.
GPA - total amount of grade points earned / total number of credits
Your grade point average may range from 0.0 to a 4.0.
Each letter grade is equivalent to a number of "Grade points" (check the below table).
Alpha Grade
Grade Points
4.0
3.0
2.0
1.0
0.0
In the below sample runl, the GPA is calculated as follows:
GPA ((4.0 3)+(4.0 1)+(3.0 3) + (1.0 3)+ (2.0 3))/(3+1+3+3+3)
GPA = 34.0 / 13 = 2.6153846153846154
Sample Run1:
Enter Alpha grade and credita N to atop): A 3
Enter Alpha grade and eredits ( to stop): A 1
Using java
Enter Alpha grade and eredits to atop): B3
Enter Alpha grade and credits (N to stop): D 3
Inter Alpha grade and eredits ( to top): C 3
Enter Alpha grade and credits (N to stop): N
Your gpa is 2.6153846153846154
Sample Run2:
Enter Alpha grade and eredits N to stop): 3 3
Enter Alpha gzade and credits (N to stop): C 3
Enter Alpha grade and eredits ( to stop): F 3
Enter Alpha grade and credita E to stop): A 1
Enter Alpha grade and eredits (N to stop): #
Your gpa is 1.9
Sample Run3:
Enter Alpha grade and eredits (N to stop) : N
No grades entered.
Transcribed Image Text:Grade Point Average- GPA calculator: Write a program that asks the user to enter his letter grade in each course and the number of credits of this course. When the user enters the letter 'N' or 'n' then the program will display the GPA of this student. Your grade point average (GPA) is calculated by dividing the total amount of grade points carned, by total number of credit hours attempted. GPA - total amount of grade points earned / total number of credits Your grade point average may range from 0.0 to a 4.0. Each letter grade is equivalent to a number of "Grade points" (check the below table). Alpha Grade Grade Points 4.0 3.0 2.0 1.0 0.0 In the below sample runl, the GPA is calculated as follows: GPA ((4.0 3)+(4.0 1)+(3.0 3) + (1.0 3)+ (2.0 3))/(3+1+3+3+3) GPA = 34.0 / 13 = 2.6153846153846154 Sample Run1: Enter Alpha grade and credita N to atop): A 3 Enter Alpha grade and eredits ( to stop): A 1 Using java Enter Alpha grade and eredits to atop): B3 Enter Alpha grade and credits (N to stop): D 3 Inter Alpha grade and eredits ( to top): C 3 Enter Alpha grade and credits (N to stop): N Your gpa is 2.6153846153846154 Sample Run2: Enter Alpha grade and eredits N to stop): 3 3 Enter Alpha gzade and credits (N to stop): C 3 Enter Alpha grade and eredits ( to stop): F 3 Enter Alpha grade and credita E to stop): A 1 Enter Alpha grade and eredits (N to stop): # Your gpa is 1.9 Sample Run3: Enter Alpha grade and eredits (N to stop) : N No grades entered.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT