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 |
兄弟姐妹们,谁知道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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator