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