Ask Experts Questions for FREE Help !
Ask
    pell's Avatar
    pell Posts: 1, Reputation: 1
    New Member
     
    #1

    Oct 2, 2008, 11:08 AM
    change Math.round to output with 2 decimal places
    // Get Input Variables
    for (var p in input_data) {
    input_data[p]=parseFloat($('#'+p).val());
    }
    // Set Constants
    // to be done
    // Calculate Output Variables
    var output_data = {};

    //Set Output Variables
    for (var p in output_data) {
    $('#'+p).html(Math.round(output_data[p]));

    Here are the parts of the script that output a figure with no decimal points. How do I get it to show 2 decimal points? Thanks so much, am NOT a programmer.

Check out some similar questions!

SAS code to Format decimal places and julian date [ 2 Answers ]

I am working with a data set that I would like to link with another data set. However, I need to do two thing before linking the two data set together. One is that I have a variable claim that I need to format. The variable has values 250, 5525 etc and I need to place a period to make it 2.50,...

Calculating pi to n decimal places [ 5 Answers ]

Suppose your goal is to calculate (not look up) a value of pi that is accurate to n decimal places. Suppose n were 10. How would you do it?

Pi by recursive decimal places [ 5 Answers ]

I would like to know if there is a way to calculate pi by using the current last decimal place to calculate the next decimal place. I already made a formula for pi that I posted on another board, but someone suggested I copy here. ---Begin quote--- This doesn't really fit anywhere so I'm just...

Wrong change? Am I THAT bad at Math? [ 7 Answers ]

Hello all! I work in a supermarket and today I feared I am losing my sanity! I served a customer the transaction total was £5.64. The customer paid me a £10 note and 54p in coins... so, I began to count out the change. £4.90 right? I then said to the customer... 'Sorry it £5.64 not...

Applied math, arc length, change of parameter [ 10 Answers ]

Here's a arc length problem maybe you'd like to tackle: "Copper tubing with an outside diameter of 1/2 inches is to be wrapped in a circular helix around a cylinder core that has a diameter of 12 inches. What length of tubing will make one complete turn around the cylinder in a distance of 20...


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.