include stdio include stdlib define int main int argc char argv int ar

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <stdio.h>
#include <stdlib.h>
#define N 5
int main(int argc, char *argv[])
{
int arr[N],i,j,flag;
for(i=0 ; i < N ; ++i){
printf("arr[%d]=",i);
scanf("%d",&arr[i]);
}
for(i=1 ; i <= N ; ++i){
flag=0;
for(j=0 ; j < N ; ++j){
if(arr[j]==i)
flag++;
}
if(flag!=1)
break;
}
if(flag!=1)
printf("Ur array sucks \n");
else
printf("I like ur array \n");
system("PAUSE");
return 0;
}