Board index » cppbuilder » simple problem

simple problem


2003-07-27 02:40:28 AM
cppbuilder109
Hi !
Sorry, but I get lost with a simple problem :
double a;
a = 100/150;
How can I get the decimals as well ? Becuase the result is only 0 at this
way !!
THANKS A LOT,
Moore
 
 

Re:simple problem

a = 100.0/150.0;
"D.Moore" < XXXX@XXXXX.COM >wrote in message
Quote
Hi !

Sorry, but I get lost with a simple problem :

double a;

a = 100/150;

How can I get the decimals as well ? Becuase the result is only 0 at this
way !!

THANKS A LOT,

Moore


 

Re:simple problem

THANK YOU !!
Moore
"Paul Dadah" < XXXX@XXXXX.COM >wrote in message
Quote
a = 100.0/150.0;

"D.Moore" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Hi !
>
>Sorry, but I get lost with a simple problem :
>
>double a;
>
>a = 100/150;
>
>How can I get the decimals as well ? Becuase the result is only 0 at
this
>way !!
>
>THANKS A LOT,
>
>Moore
>
>


 

{smallsort}