|
|
back to boardWrong Answer C ! Help please! Posted by Pedro 5 Dec 2014 22:50 #include <stdio.h> #include <math.h> int main(){ double num1,num2,num3,num4; scanf("%lf %lf %lf %lf",&num1,&num2,&num3,&num4); printf("%.4lf\n%.4lf\n%.4lf\n%.4lf",sqrt(num4),sqrt(num3),sqrt(num2),sqrt(num1)); return 0; } why is it wrong? Re: Wrong Answer C ! Help please! I think it's not necessarily exactly 4 numbers. Judging from my result, I think there are many numbers in the test case. So you need a list or something to store the integers first then print the sqrt in reversed order. (also, the integer is very big, so int type might not work) |
|
|