include stdio include stdlib int main int argc char argv int 20 printf

 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
34
35
36
37
38
39
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int m[20],i=0,j=0,x=1;
printf("Input massive M:\n");
for(i=0; i<=19;i++)
{
printf("M[%d]=",i);
scanf("%d",&m[i]);
}
printf("\n");
for(i=0;i<=19;i++)
{
if(m[i]<1 || m[i]>20)
{
x=0;
break;
}
else
{
for(j=0;j<=19;j++)
{
if (m[i]==m[j])
{
x=0;
break;
}
}
if (m[i]==m[j]) break;
}
}
if (x=0) printf("Elements of massive M are not 1...20\n");
else if(x=1) printf("Elements of massive M are 1...20\n");
system("PAUSE");
return 0;
}