Skip to content

Instantly share code, notes, and snippets.

@steveobbayi
Created March 31, 2016 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steveobbayi/1ff600e64733d4058e04e7245ccbc854 to your computer and use it in GitHub Desktop.
Save steveobbayi/1ff600e64733d4058e04e7245ccbc854 to your computer and use it in GitHub Desktop.
#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