answersLogoWhite

0


Best Answer

#include <stdio.h>

int main(){ int a,b

scanf("%d",&a);

scanf("%d",&b);

a=a+b;

printf("%d",a);

return 0;

}

Hope this can help you ☺

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can you show me whole code how do you write a program in c to calculate the sum of two integers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program in c that prompt user with following lines add two integers test an integer for odd or even and quit?

write a program in C that prompts the user with the following lines: a) Add two integers c) Compare two integers for the larger t) Test an integers for odd or even q) Quit


Writes a c program to find the sum of all integers between 1 and n?

Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11


Write a program to calculate first?

int first= 1;


How do you Write a program in c language to calculate the sum of two integers?

#include #include #include void main(){char a;int firstInt, secondInt, sum;cout > firstInt >> secondInt;sum = firstInt + secondInt;cout


Write a program that uses a for statement to calculate and print the product of the odd integers from 1 to 15?

Code example:#include int main(void) { int iOddNum = 0; int iSum = 0; for(iOddNum = 1; iOddNum


Write a c plus plus program to compute two integers?

int x= 1; int y= 2;


Write a statementin a java program to read 2 integers and dispay the number of interagers between them?

a=153 a=n%10;


How do you write a c program to calculate factorial using recursion?

unsigned long nfact(int n) if (n==2) return n else return n*nfact(n-1); For 32-bit integers, this program will fail at N==13, due to overflow. For 64-bit integers, it will fail at N==21. A solution for this is an arbitrary decimal arithmetic library, perhaps based on linked lists.


How do you write 165 and 143 in lowest terms?

Fractions have lowest terms, but integers (whole numbers) don't.


Write a program to calculate the area of a cylinder using a function?

give an example of calculation of mathematics


Are integers rational numbers?

Integers are whole numbers. Rational numbers can be fractions / decimals. But it is NEVER a whole number E.G. of rational numbers : 3/4 or 1.5


Unix script to calculate average of n numbers given by user?

You really don't want to do this in a shell script - scripting languages in Unix typically do not handle or work with floating values, only integers. A better way would be to write a program to do this that works under Unix, such as a 'C" program. See the related link for an example