Skip to content

Instantly share code, notes, and snippets.

@simeondahl
Last active December 10, 2015 18:38
Show Gist options
  • Select an option

  • Save simeondahl/4476402 to your computer and use it in GitHub Desktop.

Select an option

Save simeondahl/4476402 to your computer and use it in GitHub Desktop.
A Windows (+) calculator. In C++
#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