you can use one more variable "counter" in for loop in which you can set the condition till 35 so that if that variable goes to increase from 35 than the condition goes to false any numbers from 1 to 35 will be printed