Advertisement
Pavle_nis

c#

Jan 20th, 2018
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | None | 0 0
  1. int rec_op(string n, List<string> op)
  2.         {
  3.             int larg = n.Length;
  4.             Console.WriteLine(n);
  5.             Console.WriteLine(op);
  6.  
  7.             if(larg == 2)
  8.             {
  9.                 if(op[0] == "suma")
  10.                 {
  11.                     return n[0] + n[1];
  12.                 }
  13.                 else if (op[0] == "resta")
  14.                 {
  15.                     return n[0] - n[1];
  16.                 }
  17.                 else if (op[0] == "multi")
  18.                 {
  19.                     return n[0] * n[1];
  20.                 }
  21.                 else
  22.                 {
  23.                     return n[0] / n[1];
  24.                 }
  25.             }
  26.             else
  27.             {
  28.                 if (op[0] == "suma")
  29.                 {
  30.                     List<int> expr1 = new List<int>();
  31.                     expr1=suma_list(n[0],rec_op())
  32.                 }
  33.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement