THIS IS FOR DEVC++. I use the 5.11 version   Write a program to take input of scores for Chemistry, Biology and English for a student  and display the average with 2 decimal places if all of the three scores are in the range between 1 and 100 inclusive. Program should also display the course name for which scores are entered out of range telling Average couldn't be calculated.   Following is a sample run: Enter scores for Chemistry, Biology and English between 1 and 100: 45 89 96 Avg score is 76.67 Following is another sample run: Enter scores for Chemistry, Biology and English between 1 and 100: 900 78 89 Average cannot be calculated because Chemistry Scores were not in range. Following is another sample run: Enter scores for Chemistry, Biology and English between 1 and 100: 89 767 8787 Average cannot be calculated because Biology Scores were not in range. Average cannot be calculated because English Scores were not in range. Following is another sample run: Enter scores for Chemistry, Biology and English between 1 and 100: 87 90 -1 Average cannot be calculated because English Scores were not in range.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 34SA
icon
Related questions
Question

THIS IS FOR DEVC++. I use the 5.11 version

 

Write a program to take input of scores for Chemistry, Biology and English for a student  and display the average with 2 decimal places if all of the three scores are in the range between 1 and 100 inclusive. Program should also display the course name for which scores are entered out of range telling Average couldn't be calculated.

 

Following is a sample run:

Enter scores for Chemistry, Biology and English between 1 and 100:
45
89
96
Avg score is 76.67

Following is another sample run:

Enter scores for Chemistry, Biology and English between 1 and 100:
900
78
89
Average cannot be calculated because Chemistry Scores were not in range.

Following is another sample run:

Enter scores for Chemistry, Biology and English between 1 and 100:
89
767
8787
Average cannot be calculated because Biology Scores were not in range.
Average cannot be calculated because English Scores were not in range.

Following is another sample run:

Enter scores for Chemistry, Biology and English between 1 and 100:
87
90
-1
Average cannot be calculated because English Scores were not in range.

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 6 images

Blurred answer
Knowledge Booster
Datatypes
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