this is what i wrote
could someone tell me where is my mistake?
can i use here flag at all?
#include <stdio.h>
void main ()
{
int arr[10], i, j, flag;
for (i=0;i<10;i++)
scanf ("%d", &arr[i]);
for (i=0;i<10;i++)
{
flag=1;
for (j=2;j<=(arr[i]/2); j++)
{
if (arr[i]%j==0)
{
flag=0;
break;
}...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.