Thread: Percentages
View Single Post
  #1  
Old 09-13-2003, 12:29 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Percentages

Well, i had a lot of homework today, most of them is boring stuff you all have to do with the same calculation, so i decided to make a NPC to do the work for me. Well, here it is!

A brief explaination:

Calculate 100%
With this option, you need to give the percentage, and then how much it's worth. Then, the NPC will calculate what 100% is.

Example:
NPC Code:

6% = 108
108*100=10800
10800/6 = 1800
1800 = 100%



Calculate Percent
You must pass what 100% is, and what the value is. Then, the NPC will calculate how much percent the value is.

Example:
NPC Code:

100% = 80
Value = 20
20*100
2000/80
25 %



Calculate value of a percent
You must tell what 100% is, and a percent. Then, the computer will calculate how much the value is of the percent.

Example:
NPC Code:

100%=100
Value=20
100/100
1*value(20)
20 = 20%



Yes i know it's a bit simple but it's useful for doing homework XD
Attached Files
File Type: nw homew0rk.nw (13.0 KB, 168 views)
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote