Write a program for Adding two numbers in C++

Configurare noua (How To)

Situatie

To Add two numbers in C++ we will read two numbers a and b from the user then perform add operation to add a and b together to print the addition of two numbers in C++.

Backup

#include <iostream>
using namespace std;
int main() {
int a ;
int b ;
cin>>a>>b;
cout<<a+b;
return 0;
}
Input: 2 5
Output: 7

Solutie

Tip solutie

Permanent

Voteaza

(10 din 20 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?