Language: C++

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
	string s;
	cin>>s;
	int a,b,c,d;
	a=s[0]-'0';
	b=s[1]-'0';
	c=s[2]-'0';
	d=s[3]-'0';
	if(a+b+c+d==7){
		cout<<a+b+c+d=7<<endl;
	}
	else if(a+b+c-d==7){
		cout<<a+b+c-d=7<<endl;
	}
	else if(a+b-c+d==7){
		cout<<a+b-c+d=7<<endl;
	}
	else if(a-b+c+d==7){
		cout<<a-b+c+d=7<<endl;
	}
	else if(b+c+d-a==7){
		cout<<b+c+d-a=7<<endl;
	}
	else if(a+b-c-d==7){
		cout<<a+b-c-d=7<<endl;
	}
	else if(a-b+c-d==7){
		cout<<a-b+c-d=7<<endl;
	}
	else if(b+c-d-a==7){
		cout<<b+c-d-a=7<<endl;
	}
	else if(a-b-c+d==7){
		cout<<a-b-c+d=7<<endl;
	}
	else if(b-c+d-a==7){
		cout<<b-c+d-a=7<<endl;
	}
	else if(c+d-a-b==7){
		cout<<c+d-a-b=7<<endl;
	}
	else if(a-b-c-d==7){
		cout<<a-b-c-d=7<<endl;
	}
	else if(b-c-d-a==7){
		cout<<b-c-d-a=7<<endl;
	}
		else if(c-d-a-b==7){
		cout<<c-d-a-b=7<<endl;
	}
		else if(d-a-b-c==7){
		cout<<d-a-b-c=7<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   14 |                 cout<<a+b+c+d=7<<endl;
      |                               ~^~~~~~
a.cc:17:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   17 |                 cout<<a+b+c-d=7<<endl;
      |                               ~^~~~~~
a.cc:20:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   20 |                 cout<<a+b-c+d=7<<endl;
      |                               ~^~~~~~
a.cc:23:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   23 |                 cout<<a-b+c+d=7<<endl;
      |                               ~^~~~~~
a.cc:26:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   26 |                 cout<<b+c+d-a=7<<endl;
      |                               ~^~~~~~
a.cc:29:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   29 |                 cout<<a+b-c-d=7<<endl;
      |                               ~^~~~~~
a.cc:32:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   32 |                 cout<<a-b+c-d=7<<endl;
      |                               ~^~~~~~
a.cc:35:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   35 |                 cout<<b+c-d-a=7<<endl;
      |                               ~^~~~~~
a.cc:38:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   38 |                 cout<<a-b-c+d=7<<endl;
      |                               ~^~~~~~
a.cc:41:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   41 |                 cout<<b-c+d-a=7<<endl;
      |                               ~^~~~~~
a.cc:44:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   44 |                 cout<<c+d-a-b=7<<endl;
      |                               ~^~~~~~
a.cc:47:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   47 |                 cout<<a-b-c-d=7<<endl;
      |                               ~^~~~~~
a.cc:50:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   50 |                 cout<<b-c-d-a=7<<endl;
      |                               ~^~~~~~
a.cc:53:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   53 |                 cout<<c-d-a-b=7<<endl;
      |                               ~^~~~~~
a.cc:56:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   56 |                 cout<<d-a-b-c=7<<endl;
      |                               ~^~~~~~