answersLogoWhite

0


Best Answer

#include

#include

#include

void main()

{

char a;

int firstInt, secondInt, sum;

cout << "Enter two integers/n:";

cin >> firstInt >> secondInt;

sum = firstInt + secondInt;

cout << "The result is: " << sum;

getch(a);

}

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you Write a program in c language to calculate the sum of two integers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a program to input radius of a circle and calculate the area or circumferences of the cirlce?

In which computer language?


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 Client and server program in C language using UDP?

Write and run a client and a server program in C-language using UDP


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


Write an assembly language program to print a to z on screen?

write a program to print A to Z on screen in c?


Write a program to calculate first?

int first= 1;


Can you write program by c language in dos?

Yes.


Example of Password program code in assembly language?

How to write the program un Assembly language to set a password for personal computers?


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


What are the advantages and disadvantages of machine language?

AdvantageThe only advantage is that program of machine language run very fast because no translation program is required for the CPU.DisadvantagesIt is very difficult to program in machine language. The programmer has to know details of hardware to write program.The programmer has to remember a lot of codes to write a program which results in program errors.It is difficult to debug the program.


Assembly language program for string concatenation using 8086 microprocessor?

write program to concatenating two sting in 8086 assembly language