I have a variable x with values from 1 to 390. I need to group it in intervals of 5, in other words if x<6 then interval=1; if x>5 and X<11then interval=2; if x>10 and x<16 then interval=3; etc.
What is a shorter way of writing this code without having to repeat this if statement all the way to x=390?