Language: C++

#include <string>
#include <stack>
#include <iostream>
#include <cstdlib>
using naemspace std;
int main () {
  string word;
  stack<int> S;
  while (cin >> word) {
    if (word == "+") {
      int n = S.top();
      S.pop();
      n += S.top();
      S.pop();
      S.push(n);
    }
    else if (word == "-") {
      int s = S.top();
      S.pop();
      n -= S.top();
      S.pop();
      S.push(s);
    }
    else if (word == "*") {
      int y = S.top();
      S.pop();
      n *= S.top();
      S.pop();
      S.push(y);
    }
    else {
      S.push(atoiword.c_str() )
	}
    cout << S.top() << endl;
  }
}
      
    

Compiler output:
a.cc:5:7: error: expected nested-name-specifier before 'naemspace'
    5 | using naemspace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   string word;
      |   ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:3: error: 'stack' was not declared in this scope; did you mean 'std::stack'?
    8 |   stack<int> S;
      |   ^~~~~
      |   std::stack
In file included from /usr/include/c++/14/stack:63,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_stack.h:99:11: note: 'std::stack' declared here
   99 |     class stack
      |           ^~~~~
a.cc:8:9: error: expected primary-expression before 'int'
    8 |   stack<int> S;
      |         ^~~
a.cc:9:10: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   while (cin >> word) {
      |          ^~~
      |          std::cin
In file included from a.cc:3:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:17: error: 'word' was not declared in this scope
    9 |   while (cin >> word) {
      |                 ^~~~
a.cc:11:15: error: 'S' was not declared in this scope
   11 |       int n = S.top();
      |               ^
a.cc:18:15: error: 'S' was not declared in this scope
   18 |       int s = S.top();
      |               ^
a.cc:20:7: error: 'n' was not declared in this scope
   20 |       n -= S.top();
      |       ^
a.cc:25:15: error: 'S' was not declared in this scope
   25 |       int y = S.top();
      |               ^
a.cc:27:7: error: 'n' was not declared in this scope
   27 |       n *= S.top();
      |       ^
a.cc:32:7: error: 'S' was not declared in this scope
   32 |       S.push(atoiword.c_str() )
      |       ^
a.cc:32:14: error: 'atoiword' was not declared in this scope
   32 |       S.push(atoiword.c_str() )
      |              ^~~~~~~~
a.cc:34:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   34 |     cout << S.top() << 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:34:13: error: 'S' was not declared in this scope
   34 |     cout << S.top() << endl;
      |             ^
a.cc:34:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   34 |     cout << S.top() << 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)
      |     ^~~~