Untitled

Run Settings
LanguageC
Language Version
Run Command
#include <stdio.h> int main(void) { int i=1,n,j,z,c=1,d=0,a=0,b=0; scanf("%d",&n); while(n!=0){ printf("Teste %d\n",c); i=1; while(i<=n){ scanf("%d %d",&j,&z); d=((j+b)-z)+a; printf("%d\n",d); a=0; b=0; if(j>z ){ a=d; }else{ b=d; } i++; } scanf("%d",&n); c++; } return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines