Sunday 3 June 2012

UVa 11945 Financial Management Solution

#include <clocale>
#include <cstdio>
int main(void){
 int T;
 scanf("%d", &T);
 setlocale(LC_ALL, "en_US.UTF-8");
 for(int cnum = 0; cnum++ < T; ){
  double r = 0, z;
  for(int i = 0; i < 12; ++i, r += z) scanf("%lf", &z);
  printf("%d $%'.2lf\n", cnum, r / 12.0);
 }
 return 0;
}

1 comment:

  1. Hello There. I found your blog using msn. This is an extremely well written article. I will be sure to bookmark it and return to read more of your useful information. Thanks for the post. I’ll certainly comeback. cloud accounting software for pubs

    ReplyDelete