Code
#include<iostream>
#include<iomanip>
using namespace std;
double GradePoints(double *);
int main()
{
double percentage_grade=0,grade_point;
cout << fixed << setprecision(1);
cout << "Enter percentage grades to convert to
grade points. Enter '-1' to quit.\n\n";
while(true)
{
cout << "Percentage grade:
";
cin >>
percentage_grade;
if (percentage_grade == -1)
break;
while (cin.fail())
{
cout << "*
Invalid input. Please try again ad enter a numeric value" <<
endl;;
cin.clear();
cin.ignore(INT_MAX, '\n');
cin >>
percentage_grade;
}
try
{
grade_point =
GradePoints(&percentage_grade);
cout
<<endl <<percentage_grade << "% is " <<
grade_point << " grade points." << endl;
cout <<
endl;
}
catch (const char* msg)
{
cerr <<
endl<<msg << endl;
cout <<
endl;
}
}
cout << "\nGood bye!" <<
endl<<endl;
return 1;
}
double GradePoints(double *per)
{
if (*per < 0 || *per >100)
{
throw "An exception occurred: Grade
must be between 0.0000 and 100.0000";
}
*per = round(*per);
if (*per >= 90)
return 5.0;
else if (*per >= 85 && *per <= 89)
return 4.5;
else if (*per >= 80 && *per <= 84)
return 4.0;
else if (*per >= 75 && *per <= 79)
return 3.5;
else if (*per >= 70 && *per <= 74)
return 3.0;
else if (*per >= 65 && *per <= 69)
return 2.5;
else if (*per >= 60 && *per <= 64)
return 2.0;
else if (*per >= 55 && *per <= 59)
return 1.5;
else if (*per >= 50 && *per <= 54)
return 1.0;
return 0;
}
output

If you have any query regarding the code please ask me in the comment i am here for help you. Please do not direct thumbs down just ask if you have any query. And if you like my work then please appreciates with up vote. Thank You.
This is in C++. Example: You will write a program that will prompt the user to...
For C++ program Your program should first prompt the user for the number of students they wish to enter. For each student, the user will be prompted to enter the student’s name, how many tests the student has taken, and the grade for each test. Each test’s grade will be inputted as a number representing the grade for that test. Once each student’s information has been entered, the program will display the number of students. Additionally, each student will have...
Write a C++ program that will provide a user with a grade range if they enter a letter grade. Your program should contain one function. Your function will accept one argument of type char and will not return anything (the return type will be void), but rather print statements to the console. Your main function will contain code to prompt the user to enter a letter grade. It will pass the letter grade entered by the user to your function....
You are to write a program IN C++ that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: if the an item's wholesale cost is 5.00 and its markup percentage is 100%, then the item's retail price is 10.00 If an item's wholesale cost is 5.00 and its markup percentage is 50%, then the item's retail price is 7.50 Program design specs. You should have 5...
Write a C++ program that computes student grades for an assignment as a percentage given each student's score and the total points. The final score must be rounded up to the nearest whole value using the ceil function in the <cmath header file and displayed as a percentage. You must also display the floating-point result up to 5 decimal places. You must use at least 2 functions: one to print the last name of the student and another function to...
Write a program that computes the average of a set of grades.
The user is prompted the following:
1-Number of grades to be entered.
2-The value of the minimum grade.
3-The value of the maximum grade.
Make sure to write input validation for the following:
1-The number of grades cannot be negative! In case it is 0, it
means that user has no grades to enter.
2-Each entered grade should be a valid grade between the minimum
and maximum values...
C++ Grades . Write a program that uses enum types to assign letter grades that can be automatically converted to numerical grades. For this assignment, you'll create an enum type with the values F, D, C, B, and A, so the letter grades are associated with ordinal values 0, 1, 2, 3, and 4, respectively (which coincide with the quality points for that grade). Write a method assignCourseGrade(double grade) which takes a real number representing the grade for the class,...
Write a C++ Program. you were required to first create a function called average. The return type is double and it takes in two parameters, one of type string the other of type double. In the average function write a for loop that PROMPT THE USER to enter in a grade 5 times, keep a sum of all the different grades then return the average of the grades. (sum / 5) Next write a function of type double called lowest...
Plz help!! The programming
language is C and could you write comments as well?
Problem 2. Calculate Grades (35 points) Arrays can be used for any data type, such as int and char. But they can also be used for complex data types like structs. Structs can be simple, containing simple data types, but they can also contain more complex data types, such as another struct. So you could have a struct inside of a struct. This problem deals with...
Microsoft Visual Studios 2017 Write a C++ program that computes a student’s grade for an assignment as a percentage given the student’s score and total points. The final score must be rounded up to the nearest whole value using the ceil function in the <cmath> header file. You must also display the floating-point result up to 5 decimal places. The input to the program must come from a file containing a single line with the score and total separated by...
In this project you will create a console C++ program that will have the user to enter Celsius temperature readings for anywhere between 1 and 365 days and store them in a dynamically allocated array, then display a report showing both the Celsius and Fahrenheit temperatures for each day entered. This program will require the use of pointers and dynamic memory allocation. Getting and Storing User Input: For this you will ask the user how many days’ worth of temperature...