Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
   int A,B,C,D;
  cin >> A >> B >> C >> D;	
	if(A+B+C+D==7){
	cout << A << ;
	cout << "+" << ;
	cout << B << ;
	cout << "+" << ;
	cout << C << ;
	cout << "+" << ;
	cout << D << ;
	cout << "=" << ;
	cout << "7" << ;
}	else if(A+B+C-D==7){
	cout << A << ;
	cout << "+" << ;
	cout << B << ;
	cout << "+" << ;
	cout << C << ;
	cout << "-" << ;
	cout << D << ;
	cout << "=" << ;
	cout << "7" << ;
}	else if(A+B-C+D==7){
	cout << A << ;
	cout << "+" << ;
	cout << B << ;
	cout << "-" << ;
	cout << C << ;
	cout << "+" << ;
	cout << D << ;
	cout << "=" << ;
	cout << "7" << ;
}	else if(A-B+C+D==7){
	cout << A << ;
	cout << "-" << ;
	cout << B << ;
	cout << "+" << ;
	cout << C << ;
	cout << "+" << ;
	cout << D << ;
	cout << "=" << ;
	cout << "7" << ;
}	else if(A+B-C-D==7){
	cout << A << ;
	cout << "+" << ;
	cout << B << ;
	cout << "-" << ;
	cout << C << ;
	cout << "-" << ;
	cout << D << ;
	cout << "=" << ;
	cout << "7" << ;
}	else if(A-B+C-D==7){
	cout << A << ;
	cout << "-" << ;
	cout << B << ;
	cout << "+" << ;
	cout << C << ;
	cout << "-" << ;
	cout << D << ;
	cout << "=" << ;
	cout << "7" << ;
}	else if(A-B-C+D==7){
	cout << A << ;
	cout << "-" << ;
	cout << B << ;
	cout << "-" << ;
	cout << C << ;
	cout << "+" << ;
	cout << D << ;
	cout << "=" << ;
	cout << "7" << ;
}	else if(A-B-C-D==7){
	cout << A << ;
	cout << "-" << ;
	cout << B << ;
	cout << "-" << ;
	cout << C << ;
	cout << "-" << ;
	cout << D << ;
	cout << "=" << ;
	cout << "7" << ;
}
 return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected primary-expression before ';' token
    8 |         cout << A << ;
      |                      ^
a.cc:9:24: error: expected primary-expression before ';' token
    9 |         cout << "+" << ;
      |                        ^
a.cc:10:22: error: expected primary-expression before ';' token
   10 |         cout << B << ;
      |                      ^
a.cc:11:24: error: expected primary-expression before ';' token
   11 |         cout << "+" << ;
      |                        ^
a.cc:12:22: error: expected primary-expression before ';' token
   12 |         cout << C << ;
      |                      ^
a.cc:13:24: error: expected primary-expression before ';' token
   13 |         cout << "+" << ;
      |                        ^
a.cc:14:22: error: expected primary-expression before ';' token
   14 |         cout << D << ;
      |                      ^
a.cc:15:24: error: expected primary-expression before ';' token
   15 |         cout << "=" << ;
      |                        ^
a.cc:16:24: error: expected primary-expression before ';' token
   16 |         cout << "7" << ;
      |                        ^
a.cc:18:22: error: expected primary-expression before ';' token
   18 |         cout << A << ;
      |                      ^
a.cc:19:24: error: expected primary-expression before ';' token
   19 |         cout << "+" << ;
      |                        ^
a.cc:20:22: error: expected primary-expression before ';' token
   20 |         cout << B << ;
      |                      ^
a.cc:21:24: error: expected primary-expression before ';' token
   21 |         cout << "+" << ;
      |                        ^
a.cc:22:22: error: expected primary-expression before ';' token
   22 |         cout << C << ;
      |                      ^
a.cc:23:24: error: expected primary-expression before ';' token
   23 |         cout << "-" << ;
      |                        ^
a.cc:24:22: error: expected primary-expression before ';' token
   24 |         cout << D << ;
      |                      ^
a.cc:25:24: error: expected primary-expression before ';' token
   25 |         cout << "=" << ;
      |                        ^
a.cc:26:24: error: expected primary-expression before ';' token
   26 |         cout << "7" << ;
      |                        ^
a.cc:28:22: error: expected primary-expression before ';' token
   28 |         cout << A << ;
      |                      ^
a.cc:29:24: error: expected primary-expression before ';' token
   29 |         cout << "+" << ;
      |                        ^
a.cc:30:22: error: expected primary-expression before ';' token
   30 |         cout << B << ;
      |                      ^
a.cc:31:24: error: expected primary-expression before ';' token
   31 |         cout << "-" << ;
      |                        ^
a.cc:32:22: error: expected primary-expression before ';' token
   32 |         cout << C << ;
      |                      ^
a.cc:33:24: error: expected primary-expression before ';' token
   33 |         cout << "+" << ;
      |                        ^
a.cc:34:22: error: expected primary-expression before ';' token
   34 |         cout << D << ;
      |                      ^
a.cc:35:24: error: expected primary-expression before ';' token
   35 |         cout << "=" << ;
      |                        ^
a.cc:36:24: error: expected primary-expression before ';' token
   36 |         cout << "7" << ;
      |                        ^
a.cc:38:22: error: expected primary-expression before ';' token
   38 |         cout << A << ;
      |                      ^
a.cc:39:24: error: expected primary-expression before ';' token
   39 |         cout << "-" << ;
      |                        ^
a.cc:40:22: error: expected primary-expression before ';' token
   40 |         cout << B << ;
      |                      ^
a.cc:41:24: error: expected primary-expression before ';' token
   41 |         cout << "+" << ;
      |                        ^
a.cc:42:22: error: expected primary-expression before ';' token
   42 |         cout << C << ;
      |                      ^
a.cc:43:24: error: expected primary-expression before ';' token
   43 |         cout << "+" << ;
      |                        ^
a.cc:44:22: error: expected primary-expression before ';' token
   44 |         cout << D << ;
      |                      ^
a.cc:45:24: error: expected primary-expression before ';' token
   45 |         cout << "=" << ;
      |                        ^
a.cc:46:24: error: expected primary-expression before ';' token
   46 |         cout << "7" << ;
      |                        ^
a.cc:48:22: error: expected primary-expression before ';' token
   48 |         cout << A << ;
      |                      ^
a.cc:49:24: error: expected primary-expression before ';' token
   49 |         cout << "+" << ;
      |                        ^
a.cc:50:22: error: expected primary-expression before ';' token
   50 |         cout << B << ;
      |                      ^
a.cc:51:24: error: expected primary-expression before ';' token
   51 |         cout << "-" << ;
      |                        ^
a.cc:52:22: error: expected primary-expression before ';' token
   52 |         cout << C << ;
      |                      ^
a.cc:53:24: error: expected primary-expression before ';' token
   53 |         cout << "-" << ;
      |                        ^
a.cc:54:22: error: expected primary-expression before ';' token
   54 |         cout << D << ;
      |                      ^
a.cc:55:24: error: expected primary-expression before ';' token
   55 |         cout << "=" << ;
      |                        ^
a.cc:56:24: error: expected primary-expression before ';' token
   56 |         cout << "7" << ;
      |                        ^
a.cc:58:22: error: expected primary-expression before ';' token
   58 |         cout << A << ;
      |                      ^
a.cc:59:24: error: expected primary-expression before ';' token
   59 |         cout << "-" << ;
      |                        ^
a.cc:60:22: error: expected primary-expression before ';' token
   60 |         cout << B << ;
      |                      ^
a.cc:61:24: error: expected primary-expression before ';' token
   61 |         cout << "+" << ;
      |                        ^
a.cc:62:22: error: expected primary-expression before ';' token
   62 |         cout << C << ;
      |                      ^
a.cc:63:24: error: expected primary-expression before ';' token
   63 |         cout << "-" << ;
      |                        ^
a.cc:64:22: error: expected primary-expression before ';' token
   64 |         cout << D << ;
      |                      ^
a.cc:65:24: error: expected primary-expression before ';' token
   65 |         cout << "=" << ;
      |                        ^
a.cc:66:24: error: expected primary-expression before ';' token
   66 |         cout << "7" << ;
      |                        ^
a.cc:68:22: error: expected primary-expression before ';' token
   68 |         cout << A << ;
      |                      ^
a.cc:69:24: error: expected primary-expression before ';' token
   69 |         cout << "-" << ;
      |                        ^
a.cc:70:22: error: expected primary-expression before ';' token
   70 |         cout << B << ;
      |                      ^
a.cc:71:24: error: expected primary-expression before ';' token
   71 |         cout << "-" << ;
      |                        ^
a.cc:72:22: error: expected primary-expression before ';' token
   72 |         cout << C << ;
      |                      ^
a.cc:73:24: error: expected primary-expression before ';' token
   73 |         cout << "+" << ;
      |                        ^
a.cc:74:22: error: expected primary-expression before ';' token
   74 |         cout << D << ;
      |                      ^
a.cc:75:24: error: expected primary-expression before ';' token
   75 |         cout << "=" << ;
      |                        ^
a.cc:76:24: error: expected primary-expression before ';' token
   76 |         cout << "7" << ;
      |                        ^
a.cc:78:22: error: expected primary-expression before ';' token
   78 |         cout << A << ;
      |                      ^
a.cc:79:24: error: expected primary-expression before ';' token
   79 |         cout << "-" << ;
      |                        ^
a.cc:80:22: error: expected primary-expression before ';' token
   80 |         cout << B << ;
      |                      ^
a.cc:81:24: error: expected primary-expression before ';' token
   81 |         cout << "-" << ;
      |                        ^
a.cc:82:22: error: expected primary-expression before ';' token
   82 |         cout << C << ;
      |                      ^
a.cc:83:24: error: expected primary-expression before ';' token
   83 |         cout << "-" << ;
      |                        ^
a.cc:84:22: error: expected primary-expression before ';' token
   84 |         cout << D << ;
      |                      ^
a.cc:85:24: error: expected primary-expression before ';' token
   85 |         cout << "=" << ;
      |                        ^
a.cc:86:24: error: expected primary-expression before ';' token
   86 |         cout << "7" << ;
      |                        ^