include <stdio.h>
int main(void){
int j,Lim,i,flag;
printf("Please enter a limit number : ");
scanf("%d",&Lim);
for(i=2;i<=Lim;i++){
for(j=2;j<=i-1;j++){
if(i%j==0){
flag=0;
break;}
flag=1;
}
if(flag==1)
printf("%5",i, "%5d",i);
}
return 0;
}
this is my code it get a number and print prime numbers between 2 and entered number i have to print that numbers in this vay
3 5 7 and in each row must be ten it means if we enter 100 the first line will continue till 31 then next line will start with 37 i try \t but it changes spacing to 8
3 5 7 11 13 17 19 23 29 31 .... this is the way that out put will be