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 );
  return 0;
}

Compiler output:
a.cc:6:19: error: extended character ’ is not valid in an identifier
    6 |   int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                   ^
a.cc:6:22: error: extended character ’ is not valid in an identifier
    6 |   int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                      ^
a.cc:6:38: error: extended character ’ is not valid in an identifier
    6 |   int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                                      ^
a.cc:6:41: error: extended character ’ is not valid in an identifier
    6 |   int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                                         ^
a.cc:6:57: error: extended character ’ is not valid in an identifier
    6 |   int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                                                         ^
a.cc:6:60: error: extended character ’ is not valid in an identifier
    6 |   int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                                                            ^
a.cc:6:76: error: extended character ’ is not valid in an identifier
    6 |   int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                                                                            ^
a.cc:6:79: error: extended character ’ is not valid in an identifier
    6 |   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:6:19: error: '\U000020190' was not declared in this scope
    6 |   int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
      |                   ^~
a.cc:7:10: error: 'b' was not declared in this scope
    7 |   if (a -b -c - d ==7) printf ("% d -% d -% d -% d =7\ n " ,a ,b ,c , d );
      |          ^
a.cc:7:13: error: 'c' was not declared in this scope
    7 |   if (a -b -c - d ==7) printf ("% d -% d -% d -% d =7\ n " ,a ,b ,c , d );
      |             ^
a.cc:7:17: error: 'd' was not declared in this scope
    7 |   if (a -b -c - d ==7) printf ("% d -% d -% d -% d =7\ n " ,a ,b ,c , d );
      |                 ^
a.cc:7:32: warning: unknown escape sequence: '\040'
    7 |   if (a -b -c - d ==7) printf ("% d -% d -% d -% d =7\ n " ,a ,b ,c , d );
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:8:38: warning: unknown escape sequence: '\040'
    8 |   else if (a -b - c + d ==7) printf ("% d -% d -% d +% d =7\ n " ,a ,b ,c , d );
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:9:38: 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:39: 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:38: 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:39: 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:39: 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:40: warning: unknown escape sequence: '\040'
   14 |   else if ( a + b + c + d ==7) printf ("% d +% d +% d +% d =7\ n " ,a ,b ,c , d );
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~