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


Expert's answer

#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!

LATEST TUTORIALS
APPROVED BY CLIENTS