int main()
{
    float x = 50;
    float y = 1/x;
    float result = y * x;
    float test = 41;
    float z = 1/test;
    float testRes = z * test;
    while (result == 1)
    {    
        x--;
    }
    printf("%f\n", x);
    printf("%.6f\n", testRes);
}
My while loop is infinite, it never ends, but it should end at 41 because when I test 41, it equals 0.99999404
 
    