Outputs m-n prime numbers, int range. Use arrays, not functions or pointers. Use a loop to submit, ask for an array approach.

#include<stdio.h>

#include<math.h>

main()

{

int?i,j,n,m;

char?a[32767];

scanf("%d?%d" ,&m,&n);

if(m>n){i=n;n=m;m=i;}

for(i=m;i<=n;i++)a[i]=1;

if(m<2)m=2;

for(i=m;i<=sqrt(n);i++)

if(a[i])

for(j=i+i;j<=n;j+=i)a[j]=0;

for(i=m;i<=n;i++)

if(a[i])printf("%d?",i);

printf("\n");

}