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.
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...
Related questions
Concept explainers
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Question
i need the answer quickly
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Knowledge Booster
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.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT