Language: C++

#include<iostream>
#include<algorithm>//sort(昇順)
#include<string>
#include<cstdio>
#include<iomanip>
#include<vector>
#include<bits/stdc++.h>
#include<stack>
#include<queue>
#include<cmath>
#include<limits>
#include<map>


#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, a, b) for (int i = a; i < b; i++)

int main(){
	int a,b,c,d;
	cin >> a;
	b = a/1000;c = (a%1000)/100; d = (a%100)/10; a = a%10;
	
	     if(a+b+c+d == 7)cout << a << "+" << b << "+" << c << "+" << d << "=7" << endl;
	else if(a+b+c-d == 7)cout << a << "+" << b << "+" << c << "-" << d << "=7" << endl;
	else if(a+b-c-d == 7)cout << a << "+" << b << "-" << c << "-" << d << "=7" << endl;
	else if(a+b-c+d == 7)cout << a << "+" << b << "-" << c << "+" << d << "=7" << endl;
	else if(a-b-c-d == 7)cout << a << "-" << b << "-" << c << "-" << d << "=7" << endl;
	else if(a-b-c+d == 7)cout << a << "-" << b << "-" << c << "+" << d << "=7" << endl;
	else if(a-b+c+d == 7)cout << a << "-" << b << "+" << c << "+" << d << "=7" << endl;
	else if(a-b+c-d == 7)cout << a << "-" << b << "+" << c << "-" << d << "=7" << endl;
	else 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:20:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   20 |         cin >> a;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:23:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |              if(a+b+c+d == 7)cout << a << "+" << b << "+" << c << "+" << d << "=7" << endl;
      |                              ^~~~
      |                              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:23:87: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   23 |              if(a+b+c+d == 7)cout << a << "+" << b << "+" << c << "+" << d << "=7" << endl;
      |                                                                                       ^~~~
      |                                                                                       std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:24:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |         else if(a+b+c-d == 7)cout << a << "+" << b << "+" << c << "-" << d << "=7" << endl;
      |                              ^~~~
      |                              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:24:87: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   24 |         else if(a+b+c-d == 7)cout << a << "+" << b << "+" << c << "-" << d << "=7" << endl;
      |                                                                                       ^~~~
      |                                                                                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:25:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |         else if(a+b-c-d == 7)cout << a << "+" << b << "-" << c << "-" << d << "=7" << endl;
      |                              ^~~~
      |                              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:25:87: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |         else if(a+b-c-d == 7)cout << a << "+" << b << "-" << c << "-" << d << "=7" << endl;
      |                                                                                       ^~~~
      |                                                                                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:26:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 |         else if(a+b-c+d == 7)cout << a << "+" << b << "-" << c << "+" << d << "=7" << endl;
      |                              ^~~~
      |                              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:26:87: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   26 |         else if(a+b-c+d == 7)cout << a << "+" << b << "-" << c << "+" << d << "=7" << endl;
      |                                                                                       ^~~~
      |                                                                                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:27:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   27 |         else if(a-b-c-d == 7)cout << a << "-" << b << "-" << c << "-" << d << "=7" << endl;
      |                              ^~~~
      |                              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:27:87: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   27 |         else if(a-b-c-d == 7)cout << a << "-" << b << "-" << c << "-" << d << "=7" << endl;
      |                                                                                       ^~~~
      |                                                                                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:28:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   28 |         else if(a-b-c+d == 7)cout << a << "-" << b << "-" << c << "+" << d << "=7" << endl;
      |                              ^~~~
      |                              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:28:87: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   28 |         else if(a-b-c+d == 7)cout << a << "-" << b << "-" << c << "+" << d << "=7" << endl;
      |                                                                                       ^~~~
      |                                                                                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:29:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   29 |         else if(a-b+c+d == 7)cout << a << "-" << b << "+" << c << "+" << d << "=7" << endl;
      |                              ^~~~
      |                              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:29:87: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   29 |         else if(a-b+c+d == 7)cout << a << "-" << b << "+" << c << "+" << d << "=7" << endl;
      |                                                                                       ^~~~
      |                                                                                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:30:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   30 |         else if(a-b+c-d == 7)cout << a << "-" << b << "+" << c << "-" << d << "=7" << endl;
      |                              ^~~~
      |                              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:30:87: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   30 |         else if(a-b+c-d == 7)cout << a << "-" << b << "+" << c << "-" << d << "=7" << endl;
      |                                                                                       ^~~~
      |                                                                                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:31:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   31 |         else if(a-b+c-d == 7)cout << a << "-" << b << "+" << c << "-" << d << "=7" << endl;
      |                              ^~~~
      |                              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:31:87: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   31 |         else if(a-b+c-d == 7)cout << a << "-" << b << "+" << c << "-" << d << "=7" << endl;
      |                                                                                       ^~~~
      |                                                                                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~