answersLogoWhite

0


Best Answer

1.Declare three variables as
int a,b,c;


2.Get the Input of two numbers of Integers from the user:
scanf("%d",&a);
scanf("%d",&b);

3.add a and b and store the result in c

4. print c

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

16y ago

there are no algorithms for subtracting algorithms!!!

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write an algorithm for addition of two integer?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

A Write the algorithm to concatenate two given strings?

a write the algorithm to concatenate two given string


What is integer addition in computer science?

Integer addition is simple adding two non-decimal numbers together. For example 2+2 is integer addition.


Write an algorithm for multiplication of two sparse matrices?

how to multiply two sparse matrices


What is are advatages and disadvatages of bresenham's line algorithm?

1. High accuracy. Comparing to Basic Incremental algorithm (especially if the slope were > 1.) 2. High speed. Comparing to Digital Differenmtial algorithm. 3. Draws the line between any two points. Comparing to Basic Incremental algorithm which can't draw if x0 > x1 ( the format is: (x0, y0), (x1, y1). )


Explain How do you determine the difference when subtracting two integers with different signs?

Examples: Write the first integer as it is, turn the subtraction into the addition, change the sign of the second integer, and follow the rules of addition. -7 - (2) = -7 + (-2) = -(7 + 2) = -9 10 - (-8) = 10 + (+8) = 18


Write flowchart searching algorithm?

flow chart to swap two number


What does it mean if an integer is closed?

You don't say that "an integer is closed". It is the SET of integers which is closed UNDER A SPECIFIC OPERATION. For example, the SET of integers is closed under the operations of addition and multiplication. That means that an addition of two members of the set (two integers in this case) will again give you a member of the set (an integer in this case).


What are the differences between Bresenham's line algorithm and Bresenham's circle algorithm?

These two algorithms are almost completely different. The only real similarity is that they are each designed to use only integer addition/subtraction and multiplication, avoiding expensive division and floating point operations.


Write an addicion story for two 3-digit number?

write an addition story for two 3-digit numbers. write the answer to your story


What is two strokes over par in integers?

What is 2 strokes under when writing an integer?


How do you add integers with different signs?

1. Take the absolute values of those two integers.2. Find the difference.3. Determine which integer is the largest. If that integer is positive, then the answer is positive. If that integer is negative, then the answer is negative.


What are the rules in addition and subtraction integers?

The rules for addition are as follows:The sum of two negative integers is a negative integerThe sum of two positive integers is a positive integerThe rules for subtraction are as follows:If they are two positive numbers, do it normallyIf there is a negative and a positive ,change it to addition and switch the SECOND integer sign