Created
March 31, 2016 16:36
-
-
Save steveobbayi/1ff600e64733d4058e04e7245ccbc854 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; | |
int squareThis(int x){ | |
return x*x; | |
} | |
double squareThis(double x){ | |
return x*x; | |
} | |
int main(){ | |
cout << squareThis(2) << endl; // returns 4 | |
cout << squareThis(2.5) << endl; // returns 6.25 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment