Write a C# console application that, given a sequence of "instructions" (script), should read each line and execute the command. When all the lines are "executed" the program is considered complete. To keep it simple, the script can come from a hard-coded string.
int x
int y
set x 10
set y 20
add x y
sub y 5
print x
print y
The output should be 30 and then (on a separate line) 15.
int x: Defines a new variablexthat can hold an integer. A variable name is restricted to letters (no other characters like spaces, numbers, etc).set x 10: Changes the values of variablexto hold the constant10. Thesetinstruction expects only constantints as the second parameter.add x y->x = x + yoradd x 123->x = x + 123. Theaddinstruction expects a variable for the first parameter and a variable or a constant for the second parameter.sub y 5->y = y - 5Similar to the "add" instruction, except that it performs a subtraction.print x: prints the value forxto the console and then goes to the next line. Theprintinstruction expects only a variable as the second parameter.