I wrote a program by using 2d array.Now i cannot understand where is the problem in this program:
#include <stdio.h>
main()
{
int i,j;
int arr[2][5]={{1,2,3,4,5},{6,7,8,9,10}};
for(i=0;i<10;i++){
int flag = 1;
if (arr[i][j] == 1) flag = 0;
{
for(j=2;j<=arr[i][j]/j;j++){
if (arr[i][j]%j == 0) {
flag = 0;
break;
}
}
if (flag)
printf("This is num:%d \n",arr[i][j]);
}
return 0;
}
}