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:自己机器上可以,在它那里就runtimeErrorIn Reply To:自己机器上可以,在它那里就runtimeError Posted by:jibimily at 2007-09-08 13:12:20 #include <iostream.h> void main() { int i = 0; int j = -1; int l; int k; float n = 0.00; float c[10]; do{ j++; cin >> c[j]; }while(c[j]); for(k = 0; k <= j; k++) { for(l = 2; ; l++) { n += (float)1/l; if(c[k] <= n) { break; } } c[k] = (l-1); n = 0; } for(int m = 0; m <j; m++) { cout << c[m] << " card(s)" << endl; } } 一样的,我也是runtime error, 我看你申请的动态内存怎么没有释放啊! Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator