Answer to Question #261335 in C++ for Julius

Question #261335

Create a program that will calculate your grade in Prelim, Midterm, Prefinals, and Finals. After that, determine if you passed or failed in that subject based on your calculated grade.

1
Expert's answer
2021-11-05T03:14:48-0400
#include<iostream>
using namespace std;
int main(){
	
	cout<<"Enter the Prelim\n";
	double Prelim;
	cin>>Prelim;
	
	cout<<"Enter the Midterm\n";
	double Midterm;
	cin>>Midterm;
	
	cout<<"Enter the Prefinals\n";
	double Prefinals;
	cin>>Prefinals;
	
	cout<<"Enter the Finals\n";
	double Finals;
	cin>>Finals;
	
	double total = Prelim + Midterm + Prefinals+ Finals;
	cout<<"Total  "<<total<<endl;
	if(total<50){
		cout<<"Failed\n";
	}
	else{
		cout<<"Passed\n";
	}
}

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