What is the room number for the 125th room? - ProProfs Discuss
Advertisement

What is the room number for the 125th room?

Hospital A has 500 patient rooms, each numbered with a three-digit number beginning at 001. However, the digits 4 and 9 are not used anywhere in any room numbers.

Asked by Rathan, Last updated: Dec 11, 2023

+ Answer
Request
Question menu
Vote up Vote down

2 Answers

Ken Burns

Ken Burns

Ken Burns
Ken Burns

Answered Apr 30, 2019

Var roomNumber = 1, x = 0

repeat {

x += 1

if String(x).contains("4") || String(x).contains("9") {

continue

}

roomNumber += 1

} while roomNumber <= 125

I get 186.

upvote downvote
Reply 

John Smith

John Smith

John Smith
John Smith

Answered Sep 23, 2016

202

There are 77 4s and 9s from 001 to 125
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.