c++

posted by .

Write a program that asks the user to input a grade that he or she received on an exam. The grade is an integer from 0 to 100 inclusive. The program should convert the numeric grade into the equivalent letter grade. Do the conversion by using a function Letter_Grade () that converts a numeric grade in the range 0-100 to the equivalent letter grade. The function should have one parameter, the integer grade. The return value of the function should be A if the grade is 90 to 100; B if the grade is 80 to 89; C if the grade is 70-79; D if the grade is 65 to 69; and F if the grade is 64 or lower. After converting the grade, the program should display the numeric grade and the equivalent letter grade.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Algorithm

    Algorithm Verification Consider the following selection statement where X is an integer test score between 0 and 100. input X if (0 <= X and X < 49) output "you fail" else if (50 <= X and X < 70) output "your grade is" …
  2. Computer Programing & Logic Design

    Submit pseudocode and a flowchart for the following programming exercise: Test Average and Grade Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average …
  3. programming

    2-5 Grade Determination is says " Write a program that will input three test scores. the program should determine and display their average. the program should then display the appropriate letter grade based on there average. the letter …
  4. l;k

    Write a program that asks the user to enter the student’s name (first and last), and his/her first exam grade of three students, and then display them in a neat format. After that the program will find the average of the three grades, …
  5. programming logic

    The program will accept user input to store the student's first and last name . If the name is ZZZ, then the program will end. The program will accept: a text entry for the class number (e.g., CGS 1000, COP 1000, etc.) a numeric value …
  6. computer science

    Class scores: Write a program that calculates the total grade for N classroom exercises as a percentage. The user should input the value for N followed by each of the N scores and totals. Calculate the overall percentage (sum of the …
  7. Programming in c++

    Draw a flow-chart and Write a program that asks the user to enter students grades. The program should stop reading when the use enters ‘*’. In addition, your program should print the number of students got each grade. The grades …
  8. programming

    Write a program that requests the numeric grades on a midterm and a final exam and then uses a Function procedure to assign a semester grade (A, B, C, D, OR F). The final exam should count twice as much as the midterm exam, the semester …
  9. programming

    Write a Java application that computes and prints the grade of a student according to the following algorithm: 1) It should read from the user TMA score and MTA score. 2a) If their sum is less than 15, the grade "FC" should be printed …
  10. java programming

    Test Average and Grade Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Write the following methods in the program: • calcAverage—This …

More Similar Questions