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:哪儿出错?帮忙看看

Posted by bigcircle at 2008-09-21 13:11:34 on Problem 1001
In Reply To:哪儿出错?帮忙看看 Posted by:qianlihua at 2008-09-17 21:49:41
> #include<iostream>
> using namespace std;
> 
> double power(double a,int n)
> { double p=1;
>   while(n)
>   {p=p*a;
>    n--;
>   }
>   return p;
> }
> 
> int main()
> { double p;
>   int n;
>  while(cin>>p>>n)
>  {double s;
>   s=power(p,n);
>   cout<<s<<"\n"<<endl;
> }
> 
> 
> 
> return 0;
> 
> }

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