Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
12-01-2006, 12:39 PM #1
- Join Date
- Dec 2006
- Thanked 0 Times in 0 Posts
Basically, i'm in 11th grade and i just got an assignment where im supposed to display 5 prompts, have the user type in numbers, the numbers multiply, and then these numbers are to be displayed in signifcant figures.
The first part is cake. The numbers multiply and everything, and I discovered a function called [var].toPrecision() which gives me significant figures according to the number I ask manually.
Unfortunatly the assignment is much more technically than that. If for example i multiply 1.2222222 * 100 the signifcant figures should end at the lowest decimal, making the answer 122. And if i multiply 33.33 * 33.33 then the lowest decimal is to the hundreths place and the answer is 99.99.
12-01-2006, 03:07 PM #2
- Join Date
- Jun 2005
- Near Chicago, IL, USA
- Thanked 32 Times in 31 Posts
Other than that, I'm not sure what you're asking. Can you be a little more clear on the assignment?
Last edited by nikkiH; 12-01-2006 at 03:15 PM.
If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/