Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int n;
- int array[1000000000],c,m,count=0,num;
- scanf("%d %d", &n,&m);
- for ( c = 0 ; c < n ; c++ )
- scanf("%d", &array[c]);
- for(c=0; c<n; c++)
- {
- num=array[c];
- if(m==num)
- {
- array[c] = array[c+1];
- count++;
- }
- }
- for(c=0; c<n-count; c++)
- printf("%d ", array[c]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement