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

[C] Why wrong answer if the program shows the right solution?
Posted by Esteban Godoy 22 Aug 2018 08:06
#include<stdio.h>
#include<math.h>

int main(){

    float i=0,racuad[61];
    int a=1,b=1;

    while(i<=pow(10,18)){
        racuad[a]=sqrt(i);
        a++;
        i=1+i*7843;
    }
    for(b=a-2;b>=0;b--){
        printf("%.4f\n",racuad[b+1]);
    }


    return 0;
}