mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-20 21:33:10 -07:00
Addition
This commit is contained in:
parent
f0352d3ef2
commit
d2fa851bfe
1 changed files with 21 additions and 0 deletions
|
@ -96,4 +96,25 @@ UseTab: Never
|
||||||
#SpaceBeforeCtorInitializerColon: true
|
#SpaceBeforeCtorInitializerColon: true
|
||||||
#SpaceBeforeInheritanceColon: true
|
#SpaceBeforeInheritanceColon: true
|
||||||
#SpaceBeforeRangeBasedForLoopColon: true
|
#SpaceBeforeRangeBasedForLoopColon: true
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int num1, num2, sum;
|
||||||
|
|
||||||
|
// Taking input from the user
|
||||||
|
cout << "Enter first number: ";
|
||||||
|
cin >> num1;
|
||||||
|
cout << "Enter second number: ";
|
||||||
|
cin >> num2;
|
||||||
|
|
||||||
|
// Performing addition
|
||||||
|
sum = num1 + num2;
|
||||||
|
|
||||||
|
// Displaying the result
|
||||||
|
cout << "The sum is: " << sum << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue