Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:同学们,要用c++交,试试看看吧

Posted by wangjiayu at 2010-03-07 19:34:34 on Problem 1004
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator