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
#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;
}
Comments