View Code of Problem 72

#include<stdio.h>
int main()
{
	int m,n,i;
	scanf("%d %d",&m,&n);
	float x=m,y=m;
	for(i=1;i<n;i++)
	{
		x=x/2;
		y=y+2*x;	
	}
	x=x/2;
	printf("%.2f %.2f",x,y);
	return 0;
}

Double click to view unformatted code.


Back to problem 72