Header Ads Widget

C++ program to add two numbers

C++  program to add two numbers  

Given two numbers , objective of code is to write a program to add both numbers in c++++ .

Example :-

input:-
5 4
Output:-
9

C++  program to add two numbers

Given two integers the objective of code is to write a program that will give sum of both integers in c++ language.

C++ Code:-

#include <bits/stdc++.h>
using namespace std;
int main() {
    int a,b,sum;
    a=5;
    b=4;
    sum=a+b;
    cout<<sum<<endl;
}


Recommended Post :-

HCL Coding Questions:-

Capgemini Coding Questions:-

Companies interview:-

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-