Language: C++

n = input()
a = int(n[0])
b = int(n[1])
c = int(n[2])
d = int(n[3])

if a+b+c+d == 7:
	print(a, end='')
	print('+', end='')
	print(b, end='')
	print('+', end='')
	print(c, end='')
	print('+', end='')
	print(d, end='')
	print('=7')
    
elif a+b+c-d == 7:
	print(a, end='')
	print('+', end='')
	print(b, end='')
	print('+', end='')
	print(c, end='')
	print('-', end='')
	print(d, end='')
	print('=7')
    
elif a+b-c+d == 7:
	print(a, end='')
	print('+', end='')
	print(b, end='')
	print('-', end='')
	print(c, end='')
	print('+', end='')
	print(d, end='')
	print('=7')
    
elif a-b+c+d == 7:
	print(a, end='')
	print('-', end='')
	print(b, end='')
	print('+', end='')
	print(c, end='')
	print('+', end='')
	print(d, end='')
	print('=7')
    
elif a+b-c-d == 7:
	print(a, end='')
	print('+', end='')
	print(b, end='')
	print('-', end='')
	print(c, end='')
	print('-', end='')
	print(d, end='')
	print('=7')
    
elif a-b-c+d == 7:
	print(a, end='')
	print('-', end='')
	print(b, end='')
	print('-', end='')
	print(c, end='')
	print('+', end='')
	print(d, end='')
	print('=7')
    
elif a-b+c-d == 7:
	print(a, end='')
	print('-', end='')
	print(b, end='')
	print('+', end='')
	print(c, end='')
	print('-', end='')
	print(d, end='')
	print('=7')
    
elif a-b-c-d == 7:
	print(a, end='')
	print('-', end='')
	print(b, end='')
	print('-', end='')
	print(c, end='')
	print('-', end='')
	print(d, end='')
	print('=7')

Compiler output:
a.cc:8:22: error: empty character constant
    8 |         print(a, end='')
      |                      ^~
a.cc:9:24: error: empty character constant
    9 |         print('+', end='')
      |                        ^~
a.cc:10:22: error: empty character constant
   10 |         print(b, end='')
      |                      ^~
a.cc:11:24: error: empty character constant
   11 |         print('+', end='')
      |                        ^~
a.cc:12:22: error: empty character constant
   12 |         print(c, end='')
      |                      ^~
a.cc:13:24: error: empty character constant
   13 |         print('+', end='')
      |                        ^~
a.cc:14:22: error: empty character constant
   14 |         print(d, end='')
      |                      ^~
a.cc:15:15: warning: multi-character character constant [-Wmultichar]
   15 |         print('=7')
      |               ^~~~
a.cc:18:22: error: empty character constant
   18 |         print(a, end='')
      |                      ^~
a.cc:19:24: error: empty character constant
   19 |         print('+', end='')
      |                        ^~
a.cc:20:22: error: empty character constant
   20 |         print(b, end='')
      |                      ^~
a.cc:21:24: error: empty character constant
   21 |         print('+', end='')
      |                        ^~
a.cc:22:22: error: empty character constant
   22 |         print(c, end='')
      |                      ^~
a.cc:23:24: error: empty character constant
   23 |         print('-', end='')
      |                        ^~
a.cc:24:22: error: empty character constant
   24 |         print(d, end='')
      |                      ^~
a.cc:25:15: warning: multi-character character constant [-Wmultichar]
   25 |         print('=7')
      |               ^~~~
a.cc:28:22: error: empty character constant
   28 |         print(a, end='')
      |                      ^~
a.cc:29:24: error: empty character constant
   29 |         print('+', end='')
      |                        ^~
a.cc:30:22: error: empty character constant
   30 |         print(b, end='')
      |                      ^~
a.cc:31:24: error: empty character constant
   31 |         print('-', end='')
      |                        ^~
a.cc:32:22: error: empty character constant
   32 |         print(c, end='')
      |                      ^~
a.cc:33:24: error: empty character constant
   33 |         print('+', end='')
      |                        ^~
a.cc:34:22: error: empty character constant
   34 |         print(d, end='')
      |                      ^~
a.cc:35:15: warning: multi-character character constant [-Wmultichar]
   35 |         print('=7')
      |               ^~~~
a.cc:38:22: error: empty character constant
   38 |         print(a, end='')
      |                      ^~
a.cc:39:24: error: empty character constant
   39 |         print('-', end='')
      |                        ^~
a.cc:40:22: error: empty character constant
   40 |         print(b, end='')
      |                      ^~
a.cc:41:24: error: empty character constant
   41 |         print('+', end='')
      |                        ^~
a.cc:42:22: error: empty character constant
   42 |         print(c, end='')
      |                      ^~
a.cc:43:24: error: empty character constant
   43 |         print('+', end='')
      |                        ^~
a.cc:44:22: error: empty character constant
   44 |         print(d, end='')
      |                      ^~
a.cc:45:15: warning: multi-character character constant [-Wmultichar]
   45 |         print('=7')
      |               ^~~~
a.cc:48:22: error: empty character constant
   48 |         print(a, end='')
      |                      ^~
a.cc:49:24: error: empty character constant
   49 |         print('+', end='')
      |                        ^~
a.cc:50:22: error: empty character constant
   50 |         print(b, end='')
      |                      ^~
a.cc:51:24: error: empty character constant
   51 |         print('-', end='')
      |                        ^~
a.cc:52:22: error: empty character constant
   52 |         print(c, end='')
      |                      ^~
a.cc:53:24: error: empty character constant
   53 |         print('-', end='')
      |                        ^~
a.cc:54:22: error: empty character constant
   54 |         print(d, end='')
      |                      ^~
a.cc:55:15: warning: multi-character character constant [-Wmultichar]
   55 |         print('=7')
      |               ^~~~
a.cc:58:22: error: empty character constant
   58 |         print(a, end='')
      |                      ^~
a.cc:59:24: error: empty character constant
   59 |         print('-', end='')
      |                        ^~
a.cc:60:22: error: empty character constant
   60 |         print(b, end='')
      |                      ^~
a.cc:61:24: error: empty character constant
   61 |         print('-', end='')
      |                        ^~
a.cc:62:22: error: empty character constant
   62 |         print(c, end='')
      |                      ^~
a.cc:63:24: error: empty character constant
   63 |         print('+', end='')
      |                        ^~
a.cc:64:22: error: empty character constant
   64 |         print(d, end='')
      |                      ^~
a.cc:65:15: warning: multi-character character constant [-Wmultichar]
   65 |         print('=7')
      |               ^~~~
a.cc:68:22: error: empty character constant
   68 |         print(a, end='')
      |                      ^~
a.cc:69:24: error: empty character constant
   69 |         print('-', end='')
      |                        ^~
a.cc:70:22: error: empty character constant
   70 |         print(b, end='')
      |                      ^~
a.cc:71:24: error: empty character constant
   71 |         print('+', end='')
      |                        ^~
a.cc:72:22: error: empty character constant
   72 |         print(c, end='')
      |                      ^~
a.cc:73:24: error: empty character constant
   73 |         print('-', end='')
      |                        ^~
a.cc:74:22: error: empty character constant
   74 |         print(d, end='')
      |                      ^~
a.cc:75:15: warning: multi-character character constant [-Wmultichar]
   75 |         print('=7')
      |               ^~~~
a.cc:78:22: error: empty character constant
   78 |         print(a, end='')
      |                      ^~
a.cc:79:24: error: empty character constant
   79 |         print('-', end='')
      |                        ^~
a.cc:80:22: error: empty character constant
   80 |         print(b, end='')
      |                      ^~
a.cc:81:24: error: empty character constant
   81 |         print('-', end='')
      |                        ^~
a.cc:82:22: error: empty character constant
   82 |         print(c, end='')
      |                      ^~
a.cc:83:24: error: empty character constant
   83 |         print('-', end='')
      |                        ^~
a.cc:84:22: error: empty character constant
   84 |         print(d, end='')
      |                      ^~
a.cc:85:15: warning: multi-character character constant [-Wmultichar]
   85 |         print('=7')
      |               ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = input()
      | ^