Multiplication

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here's my code:

Dim intProduct as Integer
intProduct = (69 * 0.0254)

The correct answer is 1.7526. However, intProduct = 2. What do I need to
do to get the correct answer? Thanks.
 
Integer doesn't have a decimal portion. If you need decimal places, Dim as
double, single, or decimal.

Dim dblProduct as Double
dblProduct = (69 * 0.0254)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top