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

兄弟姐妹们,谁知道1011怎么做啊,头就要爆炸了

Posted by gsy007 at 2008-07-16 16:21:08 on Problem 1011
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{ long double r,s(1.0);
   int n,i(0),N=6;
   
   do
   {cin>>r;
   while((r<=0.0)||(r>=99.999))
      cin>>r;
    while((n<=0)||(n>25)) cin>>n;
    for(i=1;i<=n;i++)
	s*=r;
	   if (s-(int)s==0) cout<<setprecision(0)<<s<<endl;
	   if((int)s==0) cout<<setw(0)<<setprecision(32)<<s<<endl;
	   else cout<<setw(24)<<setprecision(32)<<s<<endl;
	

   N--;
   s=1.0;}while(N);
   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