+ 1
Why "world" is printing in my code
Help me in finding the reason https://code.sololearn.com/czlDsPLgb6hg/?ref=app
6 odpowiedzi
+ 3
Print values of both variables like this..
printf("%.20f\n",i);
printf("%.20lf",j);
You will understand on your own why it is printing World instead of hello..
+ 4
Because i and j are not equal. When ever you compare two variables of same value and of different data types it results in false. For example you can check by comparing an int and a float.
+ 3
double has more precision than float.
That's why both values differ.
Print those two lines as AnonymousGuy said and you get it.
+ 2
Because these variables have different types and aren't equal to eachother.
+ 2
data types are different. Use same datatypes to compare.
+ 1
Thanks to all of you