Calculating percentages (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


mbmunday -> Calculating percentages (8/3/2003 23:19:34)

I' m developing a custom Exit Interview Survey for a client and am needing to calculate percentages for the answers submitted, e.g.-20% answered " Yes" to this question, etc......

Has anyone done anything similar to this and what have I gotten myself into? (I' m scared to find out [8D])

I' m doing it in ASP, and am fairly proficient with the language, but have never worked with percentages.

Any tips (e.g. any online tutorials that you may know of out there) in the right direction is greatly appreciated.

Thanks,

MB




bobby -> RE: Calculating percentages (8/4/2003 12:12:56)

A percentage is nothing more than a fraction based on 100

So to calculate a percentage using ASP it' s just a matter of simple division... for example:

If there were 40 peopld polled, and 12 of them answered " yes" then the percentage would be ((12/40) * 100) - or 30

(You have to add the % symbol)




mbmunday -> RE: Calculating percentages (8/4/2003 16:44:47)

Thank you Bobby!




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
4.785156E-02