View Single Post
Old 10-02-2005, 03:20 AM   #11 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
Why do you only accept between 1 and 13 floors ? when the description say:
Quote:
NOTE: It is traditional that most hotels do not have a thirteenth floor. The loop in this program should skip the entire thirteenth iteration.
skip is not the same as "reject more than" or "allow only".
If you look at my code, the only part missing there, is what is left in the comments ie. calculating the percentage.
And the basics in calculating percentage in this form is to multiply the number of occupied rooms with 100 and devide that value with the total number of rooms, it's basic math 101.
It's even mentioned in the description
Quote:
The percentage may be calculated by dividing the number of rooms occupied by the number of 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