Write a program that does the following: Reads an integer from the user that represents the number of the students in a class. Reads the scores of the students from the user and stores them in an array. Calculates and prints the average of the students with a passing grade (above or equal to 60). ● ● ● Hints: ● ● Assume that the scores of the students are integers between 0 and 100 (inclusive) Assume that there is at least one student in the class with a passing grade. Sample run 1: Enter the number of students in the class: 3 Enter the scores of 3 students: 90 80 40 The average of the students with a passing grade is 85.0

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter16: Searching, Sorting And Vector Type
Section: Chapter Questions
Problem 21PE
icon
Related questions
Question
PART 2
Problem #1
Write a program that does the following:
Reads an integer from the user that represents the number of the students in a class.
Reads the scores of the students from the user and stores them in an array.
Calculates and prints the average of the students with a passing grade (above or equal to 60).
●
●
●
Hints:
●
Assume that the scores of the students are integers between 0 and 100 (inclusive)
Assume that there is at least one student in the class with a passing grade.
Sample run 1:
Enter the number of students in the class: 3
Enter the scores of 3 students: 90 80 40
The average of the students with a passing grade is 85.0
Sample run 2:
T
Enter the number of students in the class: 5
Enter the scores of 5 students: 90 80 40 60 70
The average of the students with a passing grade is 75.0
Transcribed Image Text:PART 2 Problem #1 Write a program that does the following: Reads an integer from the user that represents the number of the students in a class. Reads the scores of the students from the user and stores them in an array. Calculates and prints the average of the students with a passing grade (above or equal to 60). ● ● ● Hints: ● Assume that the scores of the students are integers between 0 and 100 (inclusive) Assume that there is at least one student in the class with a passing grade. Sample run 1: Enter the number of students in the class: 3 Enter the scores of 3 students: 90 80 40 The average of the students with a passing grade is 85.0 Sample run 2: T Enter the number of students in the class: 5 Enter the scores of 5 students: 90 80 40 60 70 The average of the students with a passing grade is 75.0
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Array
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,