NYOJ:72-Financial Management
来源:互联网 发布:黑马java培训怎么样 编辑:程序博客网 时间:2024/05/21 01:54
Financial Management
时间限制:3000 ms | 内存限制:65535 KB
难度:1
描述
Larry graduated this year and finally has a job. He’s making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial portfolio and solve his financing problems. The first step is to figure out what’s been going on with his money. Larry has his bank account statements and wants to see how much money he has. Help Larry by writing a program to take his closing balance from each of the past twelve months and calculate his average account balance.
输入
The input will be twelve lines. Each line will contain the closing balance of his bank account for a particular month. Each number will be positive and displayed to the penny. No dollar sign will be included.
输出
The output will be a single number, the average (mean) of the closing balances for the twelve months. It will be rounded to the nearest penny, preceded immediately by a dollar sign, and followed by the end-of-line. There will be no other spaces or characters in the output.
代码:
#include<stdio.h>#include<stdlib.h>int main(){ int n=12,i; float a,sum,ave; for(i=0; i<12; i++) { scanf("%f",&a); sum+=a; ave=sum/12; } printf("%.2f\n",ave);}
- NYOJ--72--Financial Management
- NYOJ 72 Financial Management
- NYOJ 72 Financial Management
- NYOJ 72 Financial Management
- 【NYOJ】[72]Financial Management
- NYOJ:72-Financial Management
- nyoj题目72:Financial Management
- NYOJ 72 Financial Management【简单题】
- NYOJ-Financial Management
- NYOJ-ACM-Financial Management
- 72 Financial Management
- 题目72 Financial Management
- 题目72-Financial Management
- 南阳oj_(72)Financial Management
- 南阳题目72-Financial Management
- NYOJ-72-Financial Management-2013年09月26日09:37:24
- NYOJ-72-Financial Management-2013年10月12日14:58:32
- Financial Management
- 解决linux-deepin无法安装python-dev的问题
- 自动http://下载问题
- MySQL查找重复索引和冗余索引
- NYOJ:71-独木舟上的旅行
- Ubantu16.04安装Qt5.4.0
- NYOJ:72-Financial Management
- 个人去办理上沪c流程
- Linux解决bash: mysql: command not found 的方法
- java基础--集合
- UVA 12096 The SetStack Computer 题解
- jQuery源码解析(1)
- 机器学习
- Openstack网络配置--命令行篇
- java基础--泛型