#include<stdio.h>
#include<stdlib.h>
int main(){
int n;
scanf("%d",&n);
// constraints
if(n<0 || n>50){
printf("Invalid Input \nEnter a positive number and less than 50");
return 0;
}
int i,j;
int temp=n;
for(i=n;i>0;i--){
printf("-%d %d\n",i,i);
}
for(j=0;j<=temp;j++){
printf("%d %d\n",j,j);
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: