Language: C++

#include<bits/stdc++.h>
using namespace std;
char s [5];
int main ()
{
scanf ("% s " ,& s );
int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
if (a -b -c - d ==7) printf ("% d -% d -% d -% d =7\ n " ,a ,b ,c , d );
else if (a -b - c + d ==7) printf ("% d -% d -% d +% d =7\ n " ,a ,b ,c , d );
else if (a - b +c - d ==7) printf ("% d -% d +% d -% d =7\ n " ,a ,b ,c , d );
else if (a - b + c + d ==7) printf ("% d -% d +% d +% d =7\ n " ,a ,b ,c , d );
else if ( a +b -c - d ==7) printf ("% d +% d -% d -% d =7\ n " ,a ,b ,c , d );
else if ( a +b - c + d ==7) printf ("% d +% d -% d +% d =7\ n " ,a ,b ,c , d );
else if ( a + b +c - d ==7) printf ("% d +% d +% d -% d =7\ n " ,a ,b ,c , d );
else if ( a + b + c + d ==7) printf ("% d +% d +% d +% d =7\ n " ,a ,b ,c , d );
}

Compiler output:
a.cc:7:17: error: extended character ’ is not valid in an identifier
    7 | int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                 ^
a.cc:7:20: error: extended character ’ is not valid in an identifier
    7 | int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                    ^
a.cc:7:36: error: extended character ’ is not valid in an identifier
    7 | int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                                    ^
a.cc:7:39: error: extended character ’ is not valid in an identifier
    7 | int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                                       ^
a.cc:7:55: error: extended character ’ is not valid in an identifier
    7 | int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                                                       ^
a.cc:7:58: error: extended character ’ is not valid in an identifier
    7 | int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                                                          ^
a.cc:7:74: error: extended character ’ is not valid in an identifier
    7 | int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                                                                          ^
a.cc:7:77: error: extended character ’ is not valid in an identifier
    7 | int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                                                                             ^
a.cc: In function 'int main()':
a.cc:7:17: error: '\U000020190' was not declared in this scope
    7 | int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                 ^~
a.cc:8:8: error: 'b' was not declared in this scope
    8 | if (a -b -c - d ==7) printf ("% d -% d -% d -% d =7\ n " ,a ,b ,c , d );
      |        ^
a.cc:8:11: error: 'c' was not declared in this scope
    8 | if (a -b -c - d ==7) printf ("% d -% d -% d -% d =7\ n " ,a ,b ,c , d );
      |           ^
a.cc:8:15: error: 'd' was not declared in this scope
    8 | if (a -b -c - d ==7) printf ("% d -% d -% d -% d =7\ n " ,a ,b ,c , d );
      |               ^
a.cc:8:30: warning: unknown escape sequence: '\040'
    8 | if (a -b -c - d ==7) printf ("% d -% d -% d -% d =7\ n " ,a ,b ,c , d );
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:9:36: warning: unknown escape sequence: '\040'
    9 | else if (a -b - c + d ==7) printf ("% d -% d -% d +% d =7\ n " ,a ,b ,c , d );
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:10:36: warning: unknown escape sequence: '\040'
   10 | else if (a - b +c - d ==7) printf ("% d -% d +% d -% d =7\ n " ,a ,b ,c , d );
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:11:37: warning: unknown escape sequence: '\040'
   11 | else if (a - b + c + d ==7) printf ("% d -% d +% d +% d =7\ n " ,a ,b ,c , d );
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:12:36: warning: unknown escape sequence: '\040'
   12 | else if ( a +b -c - d ==7) printf ("% d +% d -% d -% d =7\ n " ,a ,b ,c , d );
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:13:37: warning: unknown escape sequence: '\040'
   13 | else if ( a +b - c + d ==7) printf ("% d +% d -% d +% d =7\ n " ,a ,b ,c , d );
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:14:37: warning: unknown escape sequence: '\040'
   14 | else if ( a + b +c - d ==7) printf ("% d +% d +% d -% d =7\ n " ,a ,b ,c , d );
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:15:38: warning: unknown escape sequence: '\040'
   15 | else if ( a + b + c + d ==7) printf ("% d +% d +% d +% d =7\ n " ,a ,b ,c , d );
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~