View Code of Problem 2217

/*
商人损失了多少*/
#include <cstdio>
#include <iostream>
using namespace std;
int main(){
	double a,b,c,d;
	while(cin>>a>>b>>c>>d){
		if(a==0&&b==0&&c==0&&d==0){
			break;
		}
		printf("%.0lf\n",a-b+c);
	}
	
	
}

Double click to view unformatted code.


Back to problem 2217