Answer to Question #221435 in C++ for yulia

Question #221435

Program

Create a program that asks for the student's score and the number of items in a laboratory exercise. It will then compute for the grade using the formula. I recommend you to study and review on our lesson on Datatypes and Variables (Identifier).

Input

The user is required to enter two (2) inputs where the first input is the student score and the second one is the total number of items.

Output

The program will display the solution or formula (Score / Total # of Items) x 60 + 40 followed by an equal sign then the equivalent laboratory grade with two decimal places of the student. (Refer to the sample output)



1
Expert's answer
2021-07-29T23:30:14-0400
#include <iostream>
#include <iomanip>
using namespace std;


int main(){
	float Score;
	float TotalItems;
	cout<<"Enter Score: ";
	cin>>Score;
	cout<<"Enter Total # of Items: ";
	cin>>TotalItems;


	float laboratoryGrade=(Score / TotalItems) * 60 + 40;


	cout<<fixed<<"(Score / Total # of Items) x 60 + 40 = "<<setprecision(2)<<laboratoryGrade<<"\n";




	cin>>laboratoryGrade;
	return 0;


}





Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS