ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

Help me. What's wrong? C++ task 1001
Posted by Vladislav 28 May 2013 20:19
#include <stdio.h>
#include <math.h>
#define N 4
int main()
{
    long double a[N];
    long double b[N];
    int i = 0;
    while(i < N)
    {
        scanf("%Lf",&a[i]);
        b[i]=sqrt((long double)a[i]);
        i++;
    }
    if(i == N)
    for(i= N - 1; i>=0; i--)
    {
        printf("%.4Lf\n", b[i]);
    }


}


seems to return the right values. But writes "Wrong answer". Thanks!