View Single Post
Old 10-02-2005, 08:56 AM   #13 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
You need to think in the fact that you are dividing int's where the only way to get a double/float value out of that is to convert the result into double/float, else the result will always be what any int type can represent.
Code:
 pert_occ = static_cast<double>(100.0*no_op_rooms/no_rooms);
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote