Answer to Question #266167 in Programming & Computer Science for Stoner

Question #266167

Write a function that receives a mark as a number and calculate the final percentage

of the student. The assignment mark is out of 90 marks


1
Expert's answer
2021-11-15T07:37:14-0500
#include <iostream>
#include <iomanip>




using namespace std;




double calculateFinalPercentage(int mark){
	return mark*100.0/90.0;
}


int main(){
	int mark;
	cout<<"Enter an mark: ";
	cin>>mark;


	double finalPercentage= calculateFinalPercentage(mark);
	cout<<fixed<<"Final percentage: "<<setprecision(2)<<finalPercentage<<"%";


	cin>>mark;
	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