The idea is the following (the specific code will vary depending on the specific language):
For example, in Java you'd have
public class PrintNumbers{
public static void main(String []args){
int i;
int c = 0;
for (i=11; i<=35; i++){
System.out.print(i + " ");
c++;
if(c==5){System.out.print("\n"); c=0;}
}
}
}