Westonci.ca is the ultimate Q&A platform, offering detailed and reliable answers from a knowledgeable community. Get detailed and precise answers to your questions from a dedicated community of experts on our Q&A platform. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.

Write an algorithm to find addition, subtraction, and multiplication of 2 numbers

Sagot :

Answer:

Addition

Step 1: Input the two numbers, a and b.

Step 2: Output a + b.

Step 3: Output a - b.

Step 4: Output a * b.

Step 5: If b = 0 output “undefined”.

Step 6: Else output a / b.

subtraction

Step 1 If ( a < b ) then there will be no answer .

step 2f ( a = b ) then all the numbers greater than a are the answer so there will be infinite solutions possible.

Step 3 If ( a > b ) Suppose x is an answer to our equation. Then x divides (a – b).