Write a  C++ Program to Add Two Numbers

Program to Add Two Integers

Welcome to the World of Online Learning:

Hello Friends “This blog helps you to learn C++ programming concepts. You can learn C++ language at your own speed and time. One can learn concepts of C++ language by practicing various programs given on various pages of this blog. Enjoy the power of Self-learning using the Internet.”

Program to Add Two Integers
Program to Add Two Integers

Write a  C++ Program to Add Two Numbers

PROGRAM: Program to Add Two Integers

/* Program to Add Two Integers*/

#include <iostream>
using namespace std;

int main() {

int first_number, second_number, sum;

cout << “Enter two integers: “;
cin >> first_number >> second_number;

// sum of two numbers in stored in variable sumOfTwoNumbers
sum = first_number + second_number;

// prints sum
cout << first_number << ” + ” << second_number << ” = ” << sum;

return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *