#include "stdio.h" int main(void ) { int a[6];int i,j;int ge = 0; int num = 6;printf("Please input 6 values(not input 0 : \n");for(i=0;i<6;i++) scanf("%d",&a); printf("What you have input is just like the numbers as follows:\n");for(i=0;i<6;i++) printf("%d\n",a);
i=0;while(i<num){j=i+1; while(j<num) {
if(a[j]==a)
{
for(ge = j; ge < 6; ge++)
a[ge]=a[ge+1];
num--; } else
j++;} i++;}printf("after correction,What you have input is just like the numbers as follows:\n"); i=0;while(i < num)printf("%d\n",a[i++]); return 0;}