#include<stdio.h>
#include<stdlib.h>
int main(void)
{
int a[10], b[9];
int x, y, n, m,G;
y=0;
for (n = 0; n <= 9; n++)
{
scanf("%d", &a[n]);
}
scanf("%d", &G);
for (n = 0; n <= 9; n++)
{
if (a[n] == G) y = 1;
}
n=0;
if(y1)
{
for (m = 0; m <= 8; m++)
{
if (a[n] == G) n++;
b[m] = a[n];
n++;
}
for (m = 0; m <= 8; m++)
{
printf("%d ", b[m]);
}
}
if(y0)
{
printf(“Not exist!”);
}
system(“pause”);
return 0;
}
删除数组元素
最新推荐文章于 2021-04-13 19:59:24 发布