| ||||||||||
| 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 | |||||||||
Re:同学们,要用c++交,试试看看吧In Reply To:同学们,要用c++交,试试看看吧 Posted by:KYOU at 2009-11-11 17:19:26 #include<iostream.h>
#include<math.h>
void main()
{
int i=0;
float a[12],s=0.00,c;
for(i=0;i<12;i++)
{
cin>>a[i];
}
i=0;
while(i<12)
{
s=s+a[i];
i=i+1;
}
c=s/12;
cout<<"$"<<c<<endl;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator