+ 1
How can compare float and integer in ?
2 Respostas
+ 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