Convert the Flowchart below into a C++ program using if/else or switch statements: Figure 3-15 Nested decision structure to determine a grade False True score >= 90 print('Your grade is A.') False True score >= 80 print("Your grade is B.") False True score >= 70 print('Your grade is C.') False True score <= 0 print('Your grade is F.') print('Your grade is D.')
Added by Juan Manuel M.
Close
Step 1
Step 1: Start by declaring a variable to store the score input by the user. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 100 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Akash M.
Develop a flowchart that accepts as input three, in-class test scores and a project score for ten students which will represent their coursework score. The program should also accept the students' exam score. The students overall score should be comprised of their coursework score, which is the average of all coursework and project scores. For the students' final score, the coursework score average represents 45% and their exam score represents 55%; giving a total of 100%. Calculate the students' coursework average and the subsequent percentages to ascertain the final score. Based on the final score of the student, the program should generate a letter grade reflecting the students' overall grade. The student's letter grade should range from 'A' to 'F', see table below. Output the student's name, coursework score, exam score, final score and letter grade. [40 marks] SCORE | GRADE SCORE >= 80 | A SCORE >= 65 BUT < 80 | B SCORE >= 50 BUT < 65 | C SCORE < 50 | F
Write a program to read a list of exam scores given as integer percentages in the range 0 to 100. Display the total number of grades and the number of grades in each letter-grade category as follows: 90 to 100 is an A, 80 to 89 is a B, 70 to 79 is a C, 60 to 69 is a D, and 0 to 59 is an F. Use a negative score as a sentinel value to indicate the end of the input. (The negative value is used only to end the loop, so do not use it in the calculations.) For example, if the input is: 98 87 86 85 85 78 72 70 66 63 50 -1 The output would be: Total number of grades = 14 Number of A's = 1 Number of B's = 4 Number of C's = 6 Number of D's = 2 Number of F's = 1
Cora M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD