|
|
вернуться в форумSolved!!! Test 1001 back sqrt ( C ), please help me understand what's wrong with that #include <stdio.h> #include <stdlib.h> #include <math.h> int main(){ int sz = 256 * 1024 * 4; // Error was their - need more memory for input data double *sp, *fp, *p; sp = (double *)malloc(sz); fp = sp + (sz / sizeof(double));
for(p = sp; (p < fp) && (scanf("%lf", p) != EOF); p++); while(p > sp){ --p; printf("%.4lf\n", sqrt((double)(*p))); }; } Edited by author 20.10.2008 22:53 Re: Solved!!! Test 1001 back sqrt ( C ), please help me understand what's wrong with that in the line befor the last one you have ";", but you don't need it. |
|
|