Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language programming: input two arrays, each array does not exceed 10 elements, and output all numbers that only appear in one array.
C language programming: input two arrays, each array does not exceed 10 elements, and output all numbers that only appear in one array.
# contains "stdio.h"

Master ()

{

int i,j,sign

int a[ 10],b[ 10];

Printf ("Please enter the number of 1 0 in the group \ n");

for(I = 0; I< 10; i++)

scanf("%d ",& ampa[I]);

Printf ("Please enter the second number10 \ n");

for(I = 0; I< 10; i++)

scanf("%d ",& ampb[I]);

Printf ("Do not repeat: \ n");

for(I = 0; I< 10; i++)

{

for(j = 0; j & lt 10; j++)

{

If(a[i]==b[j]) symbol =1;

}

If (sign! = 1)printf("%3d ",a[I]);

Symbol = 0;

}

for(I = 0; I< 10; i++)

{

for(j = 0; j & lt 10; j++)

{

if(b[I]= = a[j])sign = 1;

}

If (sign! = 1)printf("%3d ",b[I]);

Symbol = 0;

}

printf(" \ n ");

}