|
|
вернуться в форумwrong answer test 3 I don't understand what problem is it #include <stdio.h> #include <math.h> int main() { long double i[10000] = {0}; int c,tmp,j=0; while ((c = getchar()) != EOF) { if ( (c != ' ') && ( c != '\n' ) && ( c != '\t' ) && ( c != '\0' ) ) { i[j] = i[j]*10 + ((int)c - 48) ; } if ( ( tmp!=' ' && tmp!='\n' && tmp!='\t' && tmp!='\0' ) && ( c == '\0' || c==' ' || c=='\n' || c=='\t' ) ) j++; tmp = c; } for ( j-- ; j>=0 ; j--) { printf("%Lf\n", sqrtl(i[j])); } return 0; } What is about the test 3 ? Re: wrong answer test 3 first:temp used without being initialized second:when do the while end up if I just put in 3 numbers |
|
|