View Code of Problem 72

#include<stdio.h>
int main(){
  double m,n,sum=0;
  scanf("%lf%lf",&m,&n);
  sum-=m;
  for(int j=0;j<n;j++){
    sum += m*2;
    m/=2;
  }
  printf("%.2lf %.2lf",m,sum);
  return 0;
}

Double click to view unformatted code.


Back to problem 72