jeudi 25 août 2016

using float data type inC [duplicate]

This question already has an answer here:

include

int main(void)
{
    float x=0.1;
    if( x == 0.1)
        printf("truen");
    else
        printf("falsen");
}

//I expect an output "true" but getting output "false", can anyone explain what's happening and give a solution

Aucun commentaire:

Enregistrer un commentaire