Language: C++

#include<iostream>
#include<queue>
#include<set>
#include<string>
#include<map>
#include<cstdio>
#include<cmath>
#include<algorithm>
using namespace std;
int a,b,c,d;
int main()
{
	cin>>a>>b>>c>>d;
	if(a+b+c+d==7)
	{
		cout<<a<<+<<b<<+<<c<<+<<d=7;
	}
	if(a+b+c-d==7)
	{
		cout<<a<<+<<b<<+<<c<<-<<d=7;
	}
	if(a+b-c+d==7)
	{
		cout<<a<<+<<b<<-<<c<<+<<d=7;
	}
	if(a-b+c+d==7)
	{
		cout<<a<<-<<b<<+<<c<<+<<d=7;
	}
	if(a+b-c-d==7)
	{
		cout<<a<<+<<b<<-<<c<<-<<d=7;
	}
	if(a-b+c-d==7)
	{
		cout<<a<<-<<b<<+<<c<<-<<d=7;
	}
	if(a-b-c+d==7)
	{
		cout<<a<<-<<b<<-<<c<<+>>d=7;
	}
	if(a-b-c-d==7)
	{
		cout<<a<<-<<b<<-<<c<<-<<d=7;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:27: error: expected primary-expression before '<<' token
   16 |                 cout<<a<<+<<b<<+<<c<<+<<d=7;
      |                           ^~
a.cc:16:33: error: expected primary-expression before '<<' token
   16 |                 cout<<a<<+<<b<<+<<c<<+<<d=7;
      |                                 ^~
a.cc:16:39: error: expected primary-expression before '<<' token
   16 |                 cout<<a<<+<<b<<+<<c<<+<<d=7;
      |                                       ^~
a.cc:20:27: error: expected primary-expression before '<<' token
   20 |                 cout<<a<<+<<b<<+<<c<<-<<d=7;
      |                           ^~
a.cc:20:33: error: expected primary-expression before '<<' token
   20 |                 cout<<a<<+<<b<<+<<c<<-<<d=7;
      |                                 ^~
a.cc:20:39: error: expected primary-expression before '<<' token
   20 |                 cout<<a<<+<<b<<+<<c<<-<<d=7;
      |                                       ^~
a.cc:24:27: error: expected primary-expression before '<<' token
   24 |                 cout<<a<<+<<b<<-<<c<<+<<d=7;
      |                           ^~
a.cc:24:33: error: expected primary-expression before '<<' token
   24 |                 cout<<a<<+<<b<<-<<c<<+<<d=7;
      |                                 ^~
a.cc:24:39: error: expected primary-expression before '<<' token
   24 |                 cout<<a<<+<<b<<-<<c<<+<<d=7;
      |                                       ^~
a.cc:28:27: error: expected primary-expression before '<<' token
   28 |                 cout<<a<<-<<b<<+<<c<<+<<d=7;
      |                           ^~
a.cc:28:33: error: expected primary-expression before '<<' token
   28 |                 cout<<a<<-<<b<<+<<c<<+<<d=7;
      |                                 ^~
a.cc:28:39: error: expected primary-expression before '<<' token
   28 |                 cout<<a<<-<<b<<+<<c<<+<<d=7;
      |                                       ^~
a.cc:32:27: error: expected primary-expression before '<<' token
   32 |                 cout<<a<<+<<b<<-<<c<<-<<d=7;
      |                           ^~
a.cc:32:33: error: expected primary-expression before '<<' token
   32 |                 cout<<a<<+<<b<<-<<c<<-<<d=7;
      |                                 ^~
a.cc:32:39: error: expected primary-expression before '<<' token
   32 |                 cout<<a<<+<<b<<-<<c<<-<<d=7;
      |                                       ^~
a.cc:36:27: error: expected primary-expression before '<<' token
   36 |                 cout<<a<<-<<b<<+<<c<<-<<d=7;
      |                           ^~
a.cc:36:33: error: expected primary-expression before '<<' token
   36 |                 cout<<a<<-<<b<<+<<c<<-<<d=7;
      |                                 ^~
a.cc:36:39: error: expected primary-expression before '<<' token
   36 |                 cout<<a<<-<<b<<+<<c<<-<<d=7;
      |                                       ^~
a.cc:40:27: error: expected primary-expression before '<<' token
   40 |                 cout<<a<<-<<b<<-<<c<<+>>d=7;
      |                           ^~
a.cc:40:33: error: expected primary-expression before '<<' token
   40 |                 cout<<a<<-<<b<<-<<c<<+>>d=7;
      |                                 ^~
a.cc:40:39: error: expected primary-expression before '>>' token
   40 |                 cout<<a<<-<<b<<-<<c<<+>>d=7;
      |                                       ^~
a.cc:44:27: error: expected primary-expression before '<<' token
   44 |                 cout<<a<<-<<b<<-<<c<<-<<d=7;
      |                           ^~
a.cc:44:33: error: expected primary-expression before '<<' token
   44 |                 cout<<a<<-<<b<<-<<c<<-<<d=7;
      |                                 ^~
a.cc:44:39: error: expected primary-expression before '<<' token
   44 |                 cout<<a<<-<<b<<-<<c<<-<<d=7;
      |                                       ^~