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:SOS "Runtime Error"In Reply To:SOS "Runtime Error" Posted by:ywj0071 at 2006-03-01 00:37:34 #include<iostream> #define MAX 100 using namespace std; void main(){ int ugly_numbers[MAX],c_in[10],n=0; ugly_numbers[0]=1; for(int i=1;i<=MAX; i++){ if(i%2==0||i%3==0||i%5==0) ugly_numbers[++n]=i; else continue; } cin>>c_in[0]; n=0; while(c_in[n++]!=0) cin>>c_in[n]; for(i=0;i<n-1;i++) cout<<ugly_numbers[c_in[i]-1]<<endl; } 就是这个,请高手指点,谢谢了! Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator