Write a program thataccepts 3 values as input,the first input value will be oneo
ID: 3616388 • Letter: W
Question
Write a program thataccepts 3 values as input,the first input value will be oneof four operationcodes either "A" for addition, "M" for multiplication, "S" forsubtraction or "D" for division,
the other two input values will be numbers. The computer isto perform a computation on the two numbers as determined by theoperation code.
The result of the computation as well as the original input is tobe written as output. An error message should be output if theoperation code is invalid. Write a program thataccepts 3 values as input,the first input value will be oneof four operation
codes either "A" for addition, "M" for multiplication, "S" forsubtraction or "D" for division,
the other two input values will be numbers. The computer isto perform a computation on the two numbers as determined by theoperation code.
The result of the computation as well as the original input is tobe written as output. An error message should be output if theoperation code is invalid.