Asked by sunita

I require an algorithm that will receive two integer items from a terminal operator, and display to the screen their sum, difference, product and quotient
How to do that?

Answers

Answered by MathMate
You do not require an algorithm to do the named operations because there is no repetition. You need a pseudocode (the steps named in English or an understandable language) or a computer programme.

Think of the computer as a robot and give it instructions to do what you need done. Split the instructions into simple steps. Post what you have and we will give you our comments.
Answered by Tiem
Get first integer number
Get second integer number
Get operator
if operator is +
set total = first number + second number
endif
elseif operator is -
set diff = first number - second
endesif
elseif operator is *
set product = first number * second number
endelseif
else
quotient = first number / second number
end else
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions