This question already has an answer here:
- Is floating point math broken? 26 answers
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