Computer Science, asked by rituraj848, 10 months ago

write an algorithm to calculate the sum difference product and subtract of two numbers.​

Answers

Answered by Sushreeya
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 sarahssynergy
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,  s=a+b
  • calculate the difference of a, b and assign it to variable d, d=a-b
  • calculate the product of a, b and assign it to variable p, p= a*b
  • calculate the division of a, b and assign it to variable r, r=a/b
  • use the calculated s, d, p and r as further needed.

Similar questions
Math, 5 months ago