题解 | #序列中删除指定数字#
序列中删除指定数字
https://www.nowcoder.com/practice/7bbcdd2177a445a9b66da79512b32dd7
#include <stdio.h> int main(){ int n=0; scanf("%d", &n); int arr[n]; for(int i=0;i<n;i++){ scanf("%d", &arr[i]); } int de=0; scanf("%d", &de); for(int p=0;p<n;p++){ if(arr[p]!=de){ printf("%d ", arr[p]); } else{ continue; } } return 0; }