View Code of Problem 72

#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
	double m,n,sum,high ;
	cin>>m>>n;
	high=m,sum=m;
	 
	for(int i=0;i<5;i++)
	{
		high= (high/2);
		sum=sum+(high*2);
	}
	
	cout<<fixed<<setprecision(2)<<high <<" "<<fixed<<setprecision(2)<<sum-(high*2)<<endl;
}

Double click to view unformatted code.


Back to problem 72