#include <stdio.h>
#include <string.h>
int main() {
int a[10] = {0};
int m = 0;
for(int i=0;i<6;i++){
scanf("%d",&a[i]);
}
printf("The input no are: ");
for(int i=0;i<6;i++){
printf("%d ",a[i]);
}
for(int i=0;i<6;i++){
for(int j=i+1;j<6;j++){
if(a[i]==a[j]){
for(int k=j;k<5;k++){//to skip the perticuler elment of repeating
a[k]=a[k+1];//we need to use k=j
}
a[5]=0; // Set last element to zero
m++;
}
}
}
printf("\nTotal repeating elements are: %d",m);
printf("\nThe output no are: ");
for(int i=0;i<6-m+1;i++){
printf("%d ",a[i]);
}
}
To embed this program on your website, copy the following code and paste it into your website's HTML: