Double forced into an int
is this true?
int myInt;
double myDouble;
scanf("%lf", &myDouble);
myInt = myDouble
if(myInt == myDouble)
{
proceed............
would they equal if the input was say 123.00 but not equal if you input 123.01
i am pretty sure that my asumption is right but let me know if i am wrong.
Re: Double forced into an int
Quote:
Originally posted by Buy2easy.com
int myInt;
double myDouble;
scanf("%lf", &myDouble);
2 questions about that...
I'm not sure about this but is there such a thing as Only 'Double'? isn't it double int or something?
and why are you putting %lf? it's that used for long float?
-Emo