#include <stdio.h>
int main (){
int x,y,i;
scanf("%d",&x);
scanf("%d",&y);
if ((x<y)&&(x>1)&&(x<20)&&(y<10000)){
for (i=1;i<=x;i++){
printf("%d ",i);
}
printf("\n");
for (i=(x+1);i<=y;i++){
printf("%d ",i);
}
}
return 0;
}
program goal:
1st: The program reads two numbers X and Y (X minor Y). The following shows a sequence from 1 to Y, moving to the next line to each X numbers.
2nd: Each sequence should be printed on one line, with a space between each number.
3rd: The entry contains two integers X (greater than 1 and less than 20) and Y (greater than X and less than 100000) respectively. p>
4th: OBS: The program does not need to have an answer for the cases where the program does not run, nor does it need user interaction.
>*** Example demonstrating the error of my program:
Removing this last space before the break of each line, the issue will be solved, I just can not find a way to do that.