Number Maze

2.8

20 votes
Problem

Ranjit wants to design a algorithm such that, if he enters two numbers, all the numbers between these two numbers are listed(except the number divisible by 5 & 3).

BUT the number divisible by both 3 & 5 is also listed (example 30) The Numbers should be separated by a "," sign

Example- if the two numbers added are- 25 & 44.

Then the output should be- 26,28,29,30,31,32,34,37,38,41,43

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?