write a program to accept arithmetic operator and two operands find the result as per the operator symbol entered using a else if ladder
Answers
Answered by
3
Answer:
Your answer is in the attachment.
The first 2 photos is the program using if else ladder
The other photos are the output
Note the last statement
else
System.out.println("Invalid character");
This I wrote so that if you enter any other character other than the in the program.
Attachments:
Similar questions
Political Science,
2 months ago
Math,
2 months ago
Political Science,
2 months ago
Computer Science,
5 months ago
History,
5 months ago
Science,
11 months ago
English,
11 months ago