Program that calculates and prints average of several grades

Assignment Help C/C++ Programming
Reference no: EM13811140

Write a C program that calculates and prints the average of several grades entered by the user. The program should first prompt the user to enter the number of grades to process (at least 2 grades must be entered by user!). It should then prompt the user for each grade. As each grade is entered, the program should ensure that the grades entered are in the grade range of zero to 100. If the grade is not in that range, an error message should be displayed (as shown below), and the user should be re-prompted for a grade. Any bad grades entered should not be included in the average calculation. Once all values are entered, the program should calculate and print the average of all of the positive values entered, rounded to the nearest whole number. At the end display a message for the appropriate letter grade as in our course in the 'How you will be graded' section in the 'Syllabus' section of the notes. This program will feature the if statement as well as programming techniques for data validation. I call it a trap loop. It traps the user into entering valid data.

Reference no: EM13811140

Questions Cloud

Explain shintoism and zoroastrianism : Shintoism and Zoroastrianism
Formal and informal commuinication methods : Describe both the formal and informal commuinication methods within the organization. Address whether or not the organization uses effective communication techniwues.
Show the items by zone or location within the store : There is other information. Some people shop on a budget so they need the price and the sale price. Use an array or vector to hold the list of items. The display should show the items by zone or location within the store. (Display the output by loc..
Analyze the cost estimating relationship method : Analyze the differences between the Cost Estimating Relationship (CER) method and the Engineered Cost Estimate method and which approach to Life-Cycle Costing (LCC) approach would be best for the business.
Program that calculates and prints average of several grades : Write a C program that calculates and prints the average of several grades entered by the user. The program should first prompt the user to enter the number of grades to process (at least 2 grades must be entered by user!)
Elements required for successful implementation : The elements required for successful implementation of the JIT/Lean philosophy include reducing setup times, performing preventive maintenance, and achieving high quality (zero defects).
What were the consequences of the climate impact : What were the consequences of the climate impact in terms of damage to the society (people, property, and so on).
Describe correlations and regression analyses : Describe correlations and regression analyses
Items in meeting organizational objectives : Describe the importance of the three items in meeting organizational objectives. Include at least one source other than the textbook.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Program to print out invalid number to character

The integer must contain 3 distinct non-zero number, or the program will print out invalid number.it should print out invalid query.

  Lab9 c lab 9 c i request this twice but no answer on this

lab 9 c ltbrgti request this twice but no answer on this please could you check this for

  Write a function that finds area and volume of a cube

write a function that finds area and volume of a cube when length is input and then write a program to test it. here is what i have so far.

  Write a program that takes a string as input

Write a program that takes a string as input (from the user) and then reverses the contents of the string. Your program should work by using two pointers.

  Programmingto compute the volume of water in the cubic feet

Write down an algorithm (Programming in C) in order to compute the volume of water in the cubic feet, flowing through a pipe of diameter d in feet, having a velocity of v feet per second.

  Take the code you wrote for the ford-fulkerson algorithm

Take the code you wrote for the Ford-Fulkerson algorithm for the maximum flow on a directed graph with capacities, and implement scaling on top of this code. You write a function

  Each clone will communicate to the parent process

Write a program that will create 3 clones. Each clone will communicate to the parent process over a pipe (There are 3 pipes) Each process will write Process n.

  Write a function template square()

Write a function template Square() that returns the square of its only argument.

  Use the getint and getintwithinrange methods

Use the getInt and getIntWithinRange methods to validate that each score ranges from 1 through 100 and add code that discards any extra entries at the prompt that asks if you want to enter another score to the application below.

  It would be cool if a device was actually part

Have you ever been low on cash and couldn't go beyond a certain dollar limit when shopping? You sort of need a calculator in your head. It would be cool if a device was actually part of the cart and as you add an item into the cart it would increm..

  calculates the average rainfall

Write a program that calculates the average rainfall for three months. The program should ask the user to enter the name of each month, such as June or July, and the amount of rain (in millimeters) that fell each month.

  As more and more mobile and handheld devices

As more and more mobile and handheld devices become prolific in everyday life, many applications have been ported from a traditional PC environment to the mobile devices. Mobile devices tend to have proprietary platforms with their own unique operati..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd