View Code of Problem 72

#include <stdio.h>
int main(){
  float m,s=0.0;
  int i, n;
  scanf("%f %d", &m, &n);
  for(i=0;i<n;i++)
  {
    s+= 1.5*m;
    m = 0.5*m;
  }
    s= s-m;
  printf("%.2f %.2f", m, s);
}

Double click to view unformatted code.


Back to problem 72