View Code of Problem 72

include<stdio.h>
int main()
{
 int m,n,i;
 double a,b;
 scanf("%d %d",&m,&n);
  a=1.0*m;b=0;
  for(i=0;i<n;i++)
  {
   b=b+2*a;
    a=a/2;
  }
  printf("%.2f %.2f",a,b-m);
  return 0;
}
/*
Main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
 include<stdio.h>
        ^
*/

Double click to view unformatted code.


Back to problem 72