题解 | #序列中删除指定数字#

序列中删除指定数字

https://www.nowcoder.com/practice/7bbcdd2177a445a9b66da79512b32dd7

#include <stdio.h>
#define N 50
int main() {
    int n = 0;
    int arr[N] = {0};
    int del = 0;
    scanf("%d", &n);
    for (int i = 0; i < n; i++)
    {
        scanf("%d", &arr[i]);
    }
    scanf("%d", &del);
    for (int i = 0; i < n; i++)
    {
        if (del == arr[i])
        {
           continue;
        }
        printf("%d ", arr[i]);
    }
   

    return 0;
}

全部评论

相关推荐

08-23 21:29
已编辑
吉林师范大学 硬件开发
牛马人的牛马人生:前期急啥 前期神仙打架高端局ssp的高级大offer 都是佬们的战争
点赞 评论 收藏
分享
头像
09-01 09:00
已编辑
四川旅游学院 运营
牛客55195891...:主要是专业不好,别的没毛病
牛客解忧铺
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务