www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/19/22:10:11

Message-Id: <3.0.32.19970719140218.006ec000@mail.geocities.com>
Date: Sat, 19 Jul 1997 21:48:11 -0300
To: djgpp AT delorie DOT com
From: Guilherme Silveira <thedarkage AT mail DOT geocities DOT com>
Subject: Long Question-Don't take a long time to answer
Mime-Version: 1.0

I was trying to do the folowing (1) and I got an the folowing (2), do you know why?


(1)

float a=0;

float b=0;

float c=0;

a=375;

b=150;

c=a/b;


(2)

I got: c=2


I was using that for virtual screen scrooling but I need a FLOAT c and not the integer part of it. 

This return is 'cause '/' returns only an integer. (I think so).

But how can I got an float value?



Guilherme

---------------------------------------------------------------

            <underline>Guilherme Silveira - Sao Paulo - Brasil

</underline><italic>                  18/09/1981 - Until Today...

</italic>carlos AT usway DOT com - thedarkage AT mail DOT geocities DOT com

          What about taking a look on my page:

http://www.geocities.com/SiliconValley/Way/5441/

DJGPP - Visual Basic - C/C++ - Xcom - Warcraft II

                         THE DARK AGE


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019