//删除数组零元素 #include<stdio.h> int main(){ int i,n,count; scanf("%d",&n); int a[n]; for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<n;i++){ if(a[i] != 0){ printf("%d ",a[i]); } } return 0; }
原文地址:https://www.cnblogs.com/Hqx-curiosity/p/12248569.html
时间: 2024-10-27 11:45:48