Language: C++

using System;
using System.Collections.Generic;

namespace dentaku
{
    class Program
    {
        static void Main(string[] args)
        {
            Stack<int> s = new Stack<int>();
            string f;
            
            int a, b;

           while((f=Console.ReadLine())!=null)
            {
                if ( f== "+")
                {
                    a = s.Pop();
                    b = s.Pop();
                    s.Push(b + a);
                }
                else if (f == "-")
                {
                    a = s.Pop();
                    b = s.Pop();
                    s.Push(b - a);
                }
                else if (f == "*")
                {
                    a = s.Pop();
                    b = s.Pop();
                    s.Push(b * a);
                }
                else
                {
                    s.Push(int.Parse(f[0].ToString()));

                }                
            }
            Console.WriteLine(s.Pop());
        }
    }
}



Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:8:26: error: 'string' has not been declared
    8 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:8:35: error: expected ',' or '...' before 'args'
    8 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:43:6: error: expected ';' after class definition
   43 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void dentaku::Program::Main(int*)':
a.cc:10:13: error: 'Stack' was not declared in this scope
   10 |             Stack<int> s = new Stack<int>();
      |             ^~~~~
a.cc:10:19: error: expected primary-expression before 'int'
   10 |             Stack<int> s = new Stack<int>();
      |                   ^~~
a.cc:11:13: error: 'string' was not declared in this scope
   11 |             string f;
      |             ^~~~~~
a.cc:15:19: error: 'f' was not declared in this scope
   15 |            while((f=Console.ReadLine())!=null)
      |                   ^
a.cc:15:21: error: 'Console' was not declared in this scope
   15 |            while((f=Console.ReadLine())!=null)
      |                     ^~~~~~~
a.cc:15:42: error: 'null' was not declared in this scope
   15 |            while((f=Console.ReadLine())!=null)
      |                                          ^~~~
a.cc:19:25: error: 's' was not declared in this scope
   19 |                     a = s.Pop();
      |                         ^
a.cc:25:25: error: 's' was not declared in this scope
   25 |                     a = s.Pop();
      |                         ^
a.cc:31:25: error: 's' was not declared in this scope
   31 |                     a = s.Pop();
      |                         ^
a.cc:37:21: error: 's' was not declared in this scope
   37 |                     s.Push(int.Parse(f[0].ToString()));
      |                     ^
a.cc:37:28: error: expected primary-expression before 'int'
   37 |                     s.Push(int.Parse(f[0].ToString()));
      |                            ^~~
a.cc:41:13: error: 'Console' was not declared in this scope
   41 |             Console.WriteLine(s.Pop());
      |             ^~~~~~~
a.cc:41:31: error: 's' was not declared in this scope
   41 |             Console.WriteLine(s.Pop());
      |                               ^