0

Guys can you help me ?

Many tall buildings, including hotels, skip the number 13 when numbering floors -- often going from floor 12 to floor 14. It is thought that the number 13 is unlucky. Write a program that will number 15 rooms starting from 1, skipping the number 13. Output to the console each room number in separate line.

30th Aug 2021, 2:26 PM
Abdoul Aziz diallo
Abdoul Aziz diallo - avatar
3 Answers
+ 5
I mean, this seems to be a very basic problem, have you tried doing some experiments by yourself? (if so, please show us the code so we can help you out). Also, take a look at the Javascript course by SoloLearn; I'm sure you can find the informations you need to solve the problem in the first few lectures: https://www.sololearn.com/learning/1024/1123/1331/1 Feel free to ask if you need any further information.
30th Aug 2021, 2:38 PM
Maz
Maz - avatar
+ 1
this ain't Twitter so no need to have "#"
30th Aug 2021, 2:45 PM
Rellot's screwdriver
Rellot's screwdriver - avatar
+ 1
https://www.sololearn.com/learning/1136/ for (var i=1; i<=15; i++){ if (i!=13) console.log(i+" Room") }
30th Aug 2021, 3:48 PM
SAN
SAN - avatar