Last active
September 6, 2018 17:20
-
-
Save DVegasa/fa3a801a6efb681dd57e7a3456e34701 to your computer and use it in GitHub Desktop.
This file contains 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 <iostream> | |
using namespace std; | |
void testIt(int a, int b) { | |
if (a != b) cout << "\n=== Bad test === \n Expected: " << a << " \n Result: " << b << " \n"; | |
} | |
void testIt(string a, string b) { | |
if (a != b) cout << "\n=== Bad test === \n Expected: " << a << " \n Result: " << b << " \n"; | |
} | |
int sum(int, int); | |
int main() { | |
if (true) { | |
testIt(4, sum(2, 2)); | |
testIt(5, sum(2, 3)); | |
testIt(0, sum(10, -10)); | |
} | |
/////////////////////////////////////////// | |
int a, b; | |
cin >> a >> b; | |
cout << sum(a, b) << endl; | |
return 0; | |
} | |
int sum(int a, int b) { | |
return a - b; | |
} | |
// Compiler: v.5.1.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment