How can compare float and integer in ? | SoloLearn: Learn to code for FREE!

+1

How can compare float and integer in ?

c

7/4/2020 1:23:51 AM

Sahan

2 Answers

New Answer

+3

Try this: #include<stdio.h> int main() { int num1=25; float num2=25.0; if(num1==num2) printf("num1 and num2 are equal"); else printf("num1 and num2 are not equal"); return 0; }

+1

Just like you compare any other types. And please use the search bar or google it first. It is not hard to find the answer to this question. Have a good day, Ćheyat https://code.sololearn.com/cpi9a5M7t1EI/?ref=app