Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please write down the program using C++ codes Grade conversion. Convert a numeri

ID: 3543262 • Letter: P

Question

Please write down the program

using C++ codes

Grade conversion. Convert a numeric grade in a scale of 0 to 100 to a letter grade: 90 to 100 corresponds to an A, 80 to 89 is B. 70 to 79 is C, 60 to 69 is D, and less than 60 is F. Sample output: Enter your numeric grade: 7 8 Your final letter grade is C Deliverables: The two programs using files names hw2a.cpp and hw2b.cpp Output of program (a) when computing Peyton Manning's 2004 rating Outputs of program (b) depend on user's input. To compare NFL quarterbacks, the NFL devised a the quarterback rating formula based on the quarterbacks number of completed passes (A), pass attempts (B), passing yards (C), touchdown passes (D), and interception (E) as follows: Completion ratio: W = ((A / B)* 100 - 30) /20 Yards per pass: X = ((C / B) - 3) / 4 Touchdown ratio: Y = (D / B) * 100) / 5 Interception ratio: Z = (9.5 - (E/B) * 100 )/4 The quarterback rating is computed by summing up the above four quantities and divide it by 0.06, but rounding up or down each value so that it is at least 0 and at most 2.375. Write a program that takes five command line inputs A, B, C, D, and E, and prints out the quarterback rating. Use your program to compute Peyton Manning's 2004 record-setting season (121.1) in which he completed 336 of 497 passes for 4557 yards, and threw 49 touchdowns and 10 interceptions.

Explanation / Answer

*****************hw2a.cpp*****************

#include<iostream>

using namespace std;

int main()

{

float a,b,c,d,e,w,x,y,z,q_rating;

cout<<"enter the value of A ,B ,C ,D ,E : ";

cin>>a>>b>>c>>d>>e;

w=((a/b)*100-30)/20;

x=((c/b)-3)/4;

y=((d/b)*100)/5;

z=(9.5-(e/b)*100)/4;


q_rating=(w+x+y+z)/0.06;

if(q_rating<0)

q_rating=0;

if(q_rating>2.375)

q_rating=2.375;

cout<<"quarterback rating: "<<q_rating;

return 0;

}


*****************hw2b.cpp*****************

#include<iostream>

using namespace std;

int main()

{int n;

cout<<"Enter your numeric grade: ";

cin>>n;

if(n>=90&&n<=100)

cout<<"Your final letter grade is A";

else if(n>=80&&n<=89)

cout<<"Your final letter grade is B";

else if(n>=70&&n<=79)

cout<<"Your final letter grade is C";

else if(n>=60&&n<=69)

cout<<"Your final letter grade is D";

else if(n<60)

cout<<"Your final letter grade is F";

return 0;

}