首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

POJ 1004(追加)

2013-10-15 
POJ 1004(累加)/* * POJ_1004.cpp * *Created on: 2013年10月14日 *Author: Administrator */#include io

POJ 1004(累加)

/* * POJ_1004.cpp * *  Created on: 2013年10月14日 *      Author: Administrator */#include <iostream>#include <cstdio>using namespace std;int main(){double n;double sum = 0;int counter = 0;while(true){counter++;if(counter > 12){break;}scanf("%lf",&n);sum += n;}printf("$%.2lf\n",sum/12);return 0;}

热点排行