vendredi 11 juin 2021

Shows a different result when divided by float 1 and int 1

This is what I am getting and I don't get why this output is coming. when I change float to int it is giving proper output.

int delta=99999997/(float)1;     
cout<<delta<<endl;

Output: 100000000

Image of ide

Aucun commentaire:

Enregistrer un commentaire