include stdio include stdlib include math define int main int argc cha

 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>
#include <math.h>
#define N 5
int main(int argc, char *argv[]) {
int m[N];
int i,j,k,t;
t=0;
printf("Vvedite massive\n");
for (i=0;i<N;i++)
scanf("%d", &m[i]);
for (i=1; i<=N; i++)
for (j=1; j<N; j++)
if (m[j]==m[i])
{ k=j;
while (k<N)
{ m[k]=m[k+1];
k++;
t+=1;
}
}
if (t==0) t=N;
for (i=0;i<=t;i++)
printf("%d\n", m[i]);
system ("PAUSE");
return 0;
}