Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int array[7] = {1, 4, 11, 0, 7, 0, 2};
- int processed[7] = {};
- int i, j = 0;
- for(i = 0; i < 7; i++)
- {
- if(array[i] != 0)
- {
- processed[j] = array[i];
- j++;
- }
- }
- for(i = 0; i < 7; i++)
- printf("%d ", processed[i]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement