Guest User

Untitled

a guest
Jul 15th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. //Compile: g++ -o jmphook.exe jmphook.cpp
  2. #include <Windows.h>
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int magicSum(int a, int b) {
  7. int sum = (a + b) * 2;
  8.  
  9. return sum;
  10. }
  11.  
  12. int main() {
  13. int a, b;
  14.  
  15. cout << "Enter first int: ";
  16. cin >> a;
  17. cout << "Enter second int: ";
  18. cin >> b;
  19.  
  20. cout << "Magic sum is: " << magicSum(a, b) << endl;
  21. return 0;
  22. }
Add Comment
Please, Sign In to add comment