Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int a, b, c, n;
- scanf("%d %d %d %d", &a, &b, &c, &n);
- if(a < c || b < c) printf("-1\n");
- else if(n > a + b - c) printf("%d\n", n - (a + b - c));
- else printf("-1\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment