[jawsscripts] Re: how to get the correct result when asking for percentage.

  • From: David Newman <djn@xxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Tue, 17 Jul 2012 12:58:53 +0100

It's doing integer arithmetic, and, without brackets, in any suitable order.

With brackets (180/256) * 100 will still be zero because 180/256 is 0 
and a bit left over.

You need to multiply first...

(180 * 100 ) / 256 works


On 17/07/2012 12:20, Jitendra wrote:
> hello friends, what function or code I should use to get the correct
> result from the following:
> 180/256*100.
> the result should be 70, and it is comming as 0.
> Thank you.
>
> __________�
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.2197 / Virus Database: 2437/5135 - Release Date: 07/16/12
>
>


__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: