View Code of Problem 72

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

Double click to view unformatted code.


Back to problem 72