[POJ 1004] Financial Management C++解题

时间:2022-05-08 18:27:29

参考:https://www.cnblogs.com/BTMaster/p/3525008.html

 #include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main()
{
float a,sum;
while (cin>>a)//要注意格式,能从文件读入多组数据!
{
sum=a;
for (int i=;i<;i++)
{
cin>>a;
sum+=a;
}
cout<<'$'<<sum/<<endl;
} return ;
}