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.
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.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 6 images