ACPrimer

POJ 1004 Financial Management

May 16th, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.16 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     double ans=0.0,x;
  5.     int i;
  6.     for(i=0;i<12;i++)
  7.     {
  8.         scanf("%lf",&x);
  9.         ans+=x;
  10.     }
  11.     printf("$%.2lf\n",ans/12);
  12.     return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment