Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
	string S;
	cin >> S;
	int a, b, c, d;
	a = S[0] - 'a';
	b = S[1] - 'a';
	c = S[2] - 'a';
	d = S[3] - 'a';
	if (a + b + c + d == 7) {
		cout << a << "+" << b << "+" << c "+" << d << "==" << 7 << endl;
		return 0;
	}
	if (a + b + c - d == 7) {
		cout << a << "+" << b << "+" << c "-" << d << "==" << 7 << endl;
		return 0;
	}if (a + b - c + d == 7) {
		cout << a << "+" << b << "-" << c "+" << d << "==" << 7 << endl;
		return 0;
	}if (a - b + c + d == 7) {
		cout << a << "-" << b << "+" << c "+" << d << "==" << 7 << endl;
		return 0;
	}if (a + b - c - d == 7) {
		cout << a << "+" << b << "-" << c "-" << d << "==" << 7 << endl;
		return 0;
	}if (a - b + c - d == 7) {
		cout << a << "-" << b << "+" << c "-" << d << "==" << 7 << endl;
		return 0;
	}if (a + b - c - d == 7) {
		cout << a << "+" << b << "-" << c "-" << d << "==" << 7 << endl;
		return 0;
	}if (a - b - c - d == 7) {
		cout << a << "-" << b << "-" << c "-" << d << "==" << 7 << endl;
		return 0;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:50: error: expected ';' before string constant
   12 |                 cout << a << "+" << b << "+" << c "+" << d << "==" << 7 << endl;
      |                                                  ^~~~
      |                                                  ;
a.cc:16:50: error: expected ';' before string constant
   16 |                 cout << a << "+" << b << "+" << c "-" << d << "==" << 7 << endl;
      |                                                  ^~~~
      |                                                  ;
a.cc:19:50: error: expected ';' before string constant
   19 |                 cout << a << "+" << b << "-" << c "+" << d << "==" << 7 << endl;
      |                                                  ^~~~
      |                                                  ;
a.cc:22:50: error: expected ';' before string constant
   22 |                 cout << a << "-" << b << "+" << c "+" << d << "==" << 7 << endl;
      |                                                  ^~~~
      |                                                  ;
a.cc:25:50: error: expected ';' before string constant
   25 |                 cout << a << "+" << b << "-" << c "-" << d << "==" << 7 << endl;
      |                                                  ^~~~
      |                                                  ;
a.cc:28:50: error: expected ';' before string constant
   28 |                 cout << a << "-" << b << "+" << c "-" << d << "==" << 7 << endl;
      |                                                  ^~~~
      |                                                  ;
a.cc:31:50: error: expected ';' before string constant
   31 |                 cout << a << "+" << b << "-" << c "-" << d << "==" << 7 << endl;
      |                                                  ^~~~
      |                                                  ;
a.cc:34:50: error: expected ';' before string constant
   34 |                 cout << a << "-" << b << "-" << c "-" << d << "==" << 7 << endl;
      |                                                  ^~~~
      |                                                  ;