Answer the question
In order to leave comments, you need to log in
Are there exact floating point data types in C/C++?
#include <stdio.h>
int main()
{
float a = 1/3.0;
if(a==0)
{
printf("NICE %lf",a);
}
else
{
printf("Not NICE %lf",a);
}
return 0;
}
#include <stdio.h>
int main()
{
float a = 1/3;
if(a==0)
{
printf("NICE %lf",a);
}
else
{
printf("Not NICE %lf",a);
}
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question