This should be a fairly easy question.
I have two int variables I need to divide to get a float.
Code:int a=6;
int b=4;
float c=a/b;
This code keeps giving me 1, and I need 1.5.
Printable View
This should be a fairly easy question.
I have two int variables I need to divide to get a float.
Code:int a=6;
int b=4;
float c=a/b;
This code keeps giving me 1, and I need 1.5.
Code:int a=6;
int b=4;
float c=float(a)/float(b);
nifty
thanks