answersLogoWhite

0

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

What else can I help you with?

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


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


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). )


Is the set of negative integers is closed under addition?

No, the set of negative integers is not closed under addition. When you add two negative integers, the result is always a negative integer. However, if you add a negative integer and a positive integer, the result can be a positive integer, which is not in the set of negative integers. Thus, the set does not satisfy the closure property for addition.


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


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.


Are all integers closed under addition?

Yes, all integers are closed under addition. This means that when you add any two integers together, the result is always another integer. For example, adding -3 and 5 yields 2, which is also an integer. Therefore, the set of integers is closed under the operation of addition.