|
|
вернуться в форумOutput limit exceeded test #1 Послано ashwin 20 ноя 2010 14:47 #include<stdio.h> #include<math.h> //#include<conio.h> void main(){ //clrscr(); double i; // unsigned long num; double range=pow(10,18); while((scanf("%lf",&i))){ if(i<0) break; if(i>range) break; printf("\n%.4lf",sqrt(i)); } //getch(); } what is wrong in my code can anyone please tell Edited by author 20.11.2010 14:47 Re: Output limit exceeded test #1 Послано ashwin 20 ноя 2010 18:50 double i=0; double nums[100000]; while((scanf("%lf",&nums[i])!=EOF){ i++; while(i>=0){ printf("\n%.4lf",sqrt(nums[i]); i--; } Now i am getting array size is too huge and i even tried dynamic allocation and it doesnt work.. I am using turbo C++ Version 3.0 compiler. Please help me with this Re: Output limit exceeded test #1 Послано ashwin 6 дек 2010 19:32 Please help guys!!!!!!!!! |
|
|