include stdafx include iostream include stdio include conio include ma

 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
#include "stdafx.h"
#include <iostream>
#include <stdio.h>
#include <conio.h>
#include <math.h>
int main(void)
{
int i;
int a[6];
for(i = 0 ; i < 6; i++) {
printf("massiv[%d] = ", i);
scanf_s("%d", &a[i]);}
for (i = 0; i < 6 - 1; i++)
{
if (a[i] != a[i + 1])
{
int temp = a[i];
a[i] = a[i + 1];
a[i + 1] = temp;
printf("%d", a[i]);
}
}
system("pause");
return 0;
}