博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
NYOJ72Financial Management
阅读量:6303 次
发布时间:2019-06-22

本文共 1338 字,大约阅读时间需要 4 分钟。

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. 
样例输入
100.00489.1212454.121234.10823.05109.205.271542.25839.1883.991295.011.75
样例输出
1581.42
View Code
#include 
int main(){ int i; float sum=0.0,x; for(i=0;i<12;i++) { scanf("%f",&x); sum+=x; } printf("%.2f\n",sum/12); return 0;}

 

转载地址:http://rsfxa.baihongyu.com/

你可能感兴趣的文章
苹果将iOS应用带入macOS
查看>>
react入门
查看>>
VUE高仿饿了么app
查看>>
针对Kubernetes软件栈有状态服务设计的思考
查看>>
你的可用性达标了吗?云端业务性能高可用的深度实践
查看>>
linux yum清缓存脚本
查看>>
基于epoll封装的事件回调miniserver
查看>>
天猫高管全面解读大快消2018新零售打法
查看>>
idea springboot热部署无效问题
查看>>
第八章 进程间通信
查看>>
HttpSession接口中的方法(Jsp中的session类的用法)
查看>>
「镁客早报」AI可预测心脏病人死亡时间;机器人开始在美国送外卖
查看>>
MoQ(基于.net3.5,c#3.0的mock框架)简单介绍
查看>>
物联网全面升级,十年内推动工业进入智能化新阶段
查看>>
spring-通过ListFactory注入List
查看>>
一种基于SDR实现的被动GSM嗅探
查看>>
阿里云ECS每天一件事D1:配置SSH
查看>>
SQL Server 性能调优(性能基线)
查看>>
uva 10801 - Lift Hopping(最短路Dijkstra)
查看>>
[Java Web]servlet/filter/listener/interceptor区别与联系
查看>>