Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
谁能帮我看看吗,怎么都过不去!#include <iostream> using namespace std; int main() { double m_month; int i=0; int temp; double sum=0; double average; while (i!=12) { cin>>m_month; sum+=m_month; i++; } average=sum/12+0.005; temp=(int)average;//integer temp=(int)((average-temp)*100); //decimal average=(int)average+(float)temp/100; //average cout<<average<<endl; return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator