Time Limit: 1000MS | Memory Limit: 10000K | |
Total Submissions: 116320 | Accepted: 53669 |
Description
Input
Output
Sample Input
100.00 489.12 12454.12 1234.10 823.05 109.20 5.27 1542.25 839.18 83.99 1295.01 1.75
Sample Output
$1581.42
翻译:
我就不一句一句翻译了,题目的大意就是Larry想要计算她一年12个月的余额平均值。
然后,是12行,分别输入一年12个月的余额,输出它们的平均值,前面带“$”符合。
这也是一道练习C语言语法的水题,
1 /* 2 poj 1000 3 version:1.0 4 author:Knight 5 Email:S.Knight.Work@gmail.com 6 */ 7 8 #include<cstdio> 9 using namespace std; 10 int main(void) 11 { 12 int i; 13 double Tmp, Sum; 14 Sum = 0.0; 15 for (i=0; i<12; i++) 16 { 17 scanf("%lf", &Tmp); 18 Sum += Tmp; 19 } 20 printf("$%.2lf\n", Sum / 12); 21 return 0; 22 }
[POJ 1004] Financial Management C++解题
原文:http://www.cnblogs.com/BTMaster/p/3525008.html