mercredi 6 mai 2020

If else condition concept problem in code [duplicate]

#include <stdio.h>

int main()
{
    float a=0.7;
    if(0.700000>a)
     printf("Hii \n");

    printf("%f\n",a);
    if(0.7>0.7)
     printf("hIi");
    else
     printf("Hello");
    return 0;
}

In this code when it got run the o/p is like->Hii 0.700000 Hello

why here first if is true while the second one is false.

Aucun commentaire:

Enregistrer un commentaire