• Math and Arithmetic

Algorithm for subtraction of two numbers?

User Avatar

Wiki User

βˆ™ 2012-08-29 14:10:06

Best Answer

read the value A,b

store the result of subtraction of a,b in continer subtraction

display subtraction

2012-08-29 14:10:06
This answer is:
User Avatar

Add your answer:

Earn +5 pts
Q: Algorithm for subtraction of two numbers?
Write your answer...

Related Questions

What are the factors of subtraction?

Finding the difference of two numbers is known as subtraction.

What is the algorithm to swap two numbers?

The algorithm to swap two numbers identified as a and b is as follows: temp = a a = b b = temp

What is algorithm to sum two natural numbers using c?

There is no algorithm. To add two numbers just put a + between them. int a = 1 + 2;

When you subtraction tow numbers?

Subtracting two numbers is finding their difference.

What is the operation in which the difference of two numbers are found?


Which set of numbers is closed under subtraction?

A set of real numbers is closed under subtraction when you take two real numbers and subtract , the answer is always a real number .

What is the highest prime number which is the sum of two prime numbers and the result from the subtraction of two prime numbers?


What are addition subtraction multiplication and division?

addition means when you add two or more numbers together.+ subtraction means you subtract two or more numbers together.- multiplication means when you mutiply two one, or more digit numbers together.x division means when you divide two numbers together./

How do you subtract two integers with the same sign?

It is normal subtraction. if the tw numbers are x and y then the subtraction is x-y

Subtraction of two number in c?

//write a program for subtraction of 2 numbers.#includemain(){int a,b,d;printf("enter 2 numbers :");scanf("%d%d",&a&b);d=a-b;printf("subtraction of 2 numbers=%d",d);}output(example)-enter 2 numbers : 3 2subtraction of 2 numbers : 1

How do you describe an algorithm with rational numbers?

Describe an algorithm for dividing rational numbers.

Write an algorithm and Draw a flowchart to accept two numbers and display the sum of the numbers?


What is a difference in subtraction?

To calculate a difference simply means to subtract two numbers.

What is the difference between subtraction and addition?

Subtraction is taking away from something, addition is adding to something. The difference between the two is called the spread or the difference of two numbers.

Write an algorithm to swap two numbers?

x = aa = bb = x

What is sub-algorithm?

It is an algorithm used by another algorithm as part of the second algorithm's operation.As an example, an algorithm for finding the median value in a list of numbers might include sorting the numbers as a sub-algorithm: There are plenty of algorithms for sorting, and the specifics of the sorting does not matter to the "median value" algorithm, only that the numbers are sorted when the sub-algorithm is done.For what an algorithm is, see related link.

What is the relationship between addition and subtraction?

The relationship between addition and subtraction is inverse. We can add two counting numbers together, and we do not need to pay attention to the order of these whole numbers. But, for subtraction, we have to subtract the smallest counting number from the largest counting number.

What is the algorithm for determining the maximum of two numbers?

Compare two numbers, a and b. If a is greater than b then return a, otherwise return b. In C, we can implement this algorithm using the ternary operator (?:), as follows: return a>b?a:b;

What is the algorithm for average of three numbers?

Algorithm for average of 3 numbers:Sum the 3 numbers.Divide the sum by 3.

What are the advantages of bresenhams's line drawing algorithm over the cartesian slope ana ddadigitial defrantial analyser?

First off, DDA uses float numbers and operators. While Bresenham's line drawing algorithm uses ints and only additions and subtraction.

What are the two numbers subtracted called?

In subtraction, the minuend minus the subtrahend equals the difference.

What transaction is used when you add two numbers then subtract the answer to another number?

Addition and subtraction!

Is the difference of two positive numbers positive?

The difference between two numbers is the result of a subtraction. This can be either positive or negative, depending on which number is greater.

Why is it subtraction and division are not included in the properties of each numbers?

Subtraction and addition are not properties of numbers themselves: they are operators that can be defined on sets of numbers.

The result obtained when two or more numbers are mutiplied is called a what?

multiplication algorithm What?? The answer is: their product.