您的位置:首页 > 其它

ZOJ Problem Set - 1048

2010-11-14 17:17 281 查看
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1048

 

没啥好说的。

 

#include <iostream>

using namespace std;

int main()
{
    float m;
    float total = 0.0;
    int count = 0;
    while(cin >> m) {
        total += m;
        count++;
        if(12 == count) {
            total = total/12.00;
            cout << "$" << total << endl;
            total = 0.0;
            count = 0;
        }
    }
    return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  float