Forum: C++ Jul 14th, 2009 |
| Replies: 3 Views: 363 thank you mrinal..
i think it is because the default datatype is double ..hence to do a proper comparison of float values,we have to specify it .
thanks. |
Forum: C++ Jul 13th, 2009 |
| Replies: 3 Views: 363 main()
{
float a=0.7;
if(a<0.7) cout<<"true" ;else cout<<"false";
}
problem---> it prints true .....
when 0.7 is replaced everywhere with 0.8 it displays false
again with 0.9 , it displays... |