Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- int main() {
- int a, t = 1;
- while(true){
- scanf("%d", &a);
- if (a == 0){
- break;
- }
- printf("Teste %d\n", t);
- int cofreJ = 0, cofreZ = 0;
- for(int i = 1; i <= a; i++){
- int J, Z;
- scanf("%d %d", &J, &Z);
- cofreJ += J;
- cofreZ += Z;
- printf("%d\n", cofreJ - cofreZ);
- }
- t++;
- printf("\n");
- }
- }
Add Comment
Please, Sign In to add comment