write an algorithm to calculate the sum difference product and subtract of two numbers.
Answers
Answered by
22
Answer:
Explanation:
start
Declare 2 variables a ,b
input 2 nos a and b
print sum=a+b
print difference = a-b
print product =a*b
stop
Answered by
5
Given is an algorithm to calculate the sum, product, difference and division of two numbers.
Explanation:
- declare the integers a, b, s, d, p, and float r.
- give the input value numbers to 'a' and 'b'.
- calculate the sum of a, b and assign it to variable s,
- calculate the difference of a, b and assign it to variable d,
- calculate the product of a, b and assign it to variable p,
- calculate the division of a, b and assign it to variable r,
- use the calculated s, d, p and r as further needed.
Similar questions