Numbers

Results 1 to 2 of 2

Thread: Numbers

  1. #1
    Join Date
    Dec 1969
    Posts
    146

    Default Numbers

    Hi, I am using the following code,<BR>&#060;%= showans("results")/showtotal("total")*100%&#062;<BR><BR>When It displays the result it displays with to about 8 decimal places. Is their anyway to make it so it only displays too 2 decimal place?? If so could someone please tell me.<BR><BR>Here is an example of what I mean<BR><BR>It displays = 16.6666666666667<BR>I want to display = 16.66<BR><BR>Thanks.

  2. #2
    Join Date
    Dec 1969
    Posts
    39

    Default RE: Numbers

    &#060;%<BR> var1=round(showans("results")/showtotal("total")*100)<BR> Response.write(var1)<BR>%&#062;<BR>try ceil also<BR>madhyastha@yahoo.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •