Answer to Question #289062 in C++ for Arjun

Question #289062

Compute the total quiz and average quiz of three (3) scores. Determine if the average score is greater than or equal to 70, if TRUE , display Remarks is “ PASSED” otherwise display “FAILED”.

1
Expert's answer
2022-01-20T08:28:07-0500
#include <iostream>
#include <string>
#include <conio.h>


using namespace std;


int main(void){
	int score;
	int sum=0;
	for(int i=0;i<3;i++){
		cout<<"Enter score "<<(i+1)<<": ";
		cin>>score;
		sum+=score;
	}
	float average=(float)sum/3.0;
	if(average>=70){
		cout<<"\nPASSED\n\n";
	}else{
		cout<<"\nFAILED\n\n";
	}


	system("pause");
	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