Design an algorithm to find the sum, difference and product of two numbers

October 29, 2014 0 Comments

Input : From the problem definition the input to the algorithm will be two numbers.
NOTE : The identification of the data type of the input is not necessary like int or float.
Output : The result sum, difference and product are to be displayed.

[N1 AND N2 are the numbers]
RES <-- N1+N2
Write: "The Sum is'. RES
RES <-- N1-N2
Write: ' The Difference is', RES
RES <-- N1* N2
Write: 'The Product is', RES

Jacob Lefore

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google