Hello good afternoon,
This is my first time using Bartleby, I am super slow in computer science and I am wondering if you please can help me to be very specific and explanative as possible with the following problem. to be honest, I don't even know how to start.
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 header file. You must also display the floating-point result of 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 a space.
In addition, you must print to the console “Excellent” if the grade is greater than or equal to 90, “Well Done” if the grade is less than 90 and greater than or equal to 80, “Good” if the grade is less than 80 and greater than or equal to 70, “Need Improvement” if the grade is less than 70 and greater than or equal to 60, and “Fail” if the grade is less than 60.
using namespace std;
int main ()
// open file
// read values
inData >> score >> TotalPoints;
GradePercent = ceil(score) / TotalPoints * 100;
// print the results
cout << "You got "<<GradePercent<<"% ";
// assign and print the grades
if (GradePercent > 90)
else if (GradePercent > 80)
cout<< "Well Done"<<endl;
else if (GradePercent > 70)
cout<< "Good"<< endl;
else if (GradePercent >= 60)
cout<< "Need Improvement"<< endl;
else if (GradePercent < 50)
cout<< "Fail"<< endl;
Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*See Solution
Q: Using the following truth table, write the equivalent Boolean equations in Sum of Product and Produc...
A: Simplification of Sum Of Products (SOP):The truth table of the SOP is as follows
Q: Show that the following grammar is ambiguous: S→AB|aaaB,A→a|Aa,B→b.
A: A grammar is known as ambiguous when there is more than one derivation tree (right most derivation t...
Q: Programming in C language.
A: In order to implement the question mentions a method called getChoice() information about which has ...
Q: What is the best way to pass 2D arrays to a function? (C++) For my program, I have a 2D array (size:...
A: There are two ways to pass 2-D array to a function either by sending the array name in the function ...
Q: In C++ Create a function called ApplyTax. The tax rate should be a const set to 8.75%. ApplyTax sho...
A: Program designThe program has 3 parts – main function, ApplyTax function and TotalCost functionthere...
Q: Show the hexadecimal representation for the phrase " University of Akron."
A: Conversion steps:Initially, write the ASCII value of each character in the phrase in binary represen...
Q: Create the physical level ERD. I believe my physical level ERD is missing several parts. However, t...
A: Hey.....The actual design of database can be represented by physical E- R diagrams.Physical ERD ...
Q: Develop the ‘Shape’ application such that: Implement an array of objects of various types (all SIX ...
A: Program plan: Define a class called “Shape”.Define a default constructor to print the message.Define...
Q: 1. /15 points] Consider the following function: Func1(A, n) * A is an array of integers 1 80; 2 for ...
A: a)Worst case running time of Func1:The random number between 1 to “n” is assigned to “k” in the give...