# Decimal Place Problem

Timothy Sam

Ranch Hand

Posts: 751

posted 10 years ago

Hi guys, I can't get the right decimal format to print on my screen. Here's an example.

Zoom Percentage: 9/128 = 0.0

Zoom Percentage: 7/26 = 0.0

Zoom Percentage: 5/26 = 0.0

Zoom Percentage: 7/19 = 0.0

Zoom Percentage: 2/19 = 0.0

Zoom Percentage: 3/18 = 0.0

Zoom Percentage: 2/18 = 0.0

Zoom Percentage: 1/14 = 0.0

Zoom Percentage: 2/14 = 0.0

Zoom Percentage: 1/12 = 0.0

Zoom Percentage: 0/12 = 0.0

Zoom Percentage: 0/14 = 0.0

Zoom Percentage: 5/14 = 0.0

Zoom Percentage: 3/13 = 0.0

Zoom Percentage: 0/13 = 0.0

Zoom Percentage: 0/9 = 0.0

Zoom Percentage: 0/9 = 0.0

Zoom Percentage: 0/10 = 0.0

Zoom Percentage: 1/10 = 0.0

Zoom Percentage: 1/5 = 0.0

The quotient always print as 0.0 where something like 9/128 should equal 0.0703125. Why is it? Here's the method where I do this stuff...

Thank you for your kind answers...

Zoom Percentage: 9/128 = 0.0

Zoom Percentage: 7/26 = 0.0

Zoom Percentage: 5/26 = 0.0

Zoom Percentage: 7/19 = 0.0

Zoom Percentage: 2/19 = 0.0

Zoom Percentage: 3/18 = 0.0

Zoom Percentage: 2/18 = 0.0

Zoom Percentage: 1/14 = 0.0

Zoom Percentage: 2/14 = 0.0

Zoom Percentage: 1/12 = 0.0

Zoom Percentage: 0/12 = 0.0

Zoom Percentage: 0/14 = 0.0

Zoom Percentage: 5/14 = 0.0

Zoom Percentage: 3/13 = 0.0

Zoom Percentage: 0/13 = 0.0

Zoom Percentage: 0/9 = 0.0

Zoom Percentage: 0/9 = 0.0

Zoom Percentage: 0/10 = 0.0

Zoom Percentage: 1/10 = 0.0

Zoom Percentage: 1/5 = 0.0

The quotient always print as 0.0 where something like 9/128 should equal 0.0703125. Why is it? Here's the method where I do this stuff...

Thank you for your kind answers...

SCJP 1.5