Last active
December 10, 2015 18:38
-
-
Save simeondahl/4476402 to your computer and use it in GitHub Desktop.
A Windows (+) calculator. In C++
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <osteam> | |
| using namespace std; | |
| int add(x,y) | |
| { | |
| return x + y; | |
| } | |
| int main() | |
| { | |
| cout << "Enter 2 number to plus." << endl; | |
| cout << "-----------------------" << endl; | |
| // the first number to plus | |
| cout << "1: "; | |
| int number_one; | |
| cin >> number_one; | |
| // the secound number to plus | |
| cout << "2: "; | |
| int number_tow; | |
| cin >> number_tow; | |
| // here comes the resultat | |
| cout <<"------------------------------" << endl; | |
| cout << "It will be:" << add(number_one, number_tow) << endl; | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment