Skip to content

Instantly share code, notes, and snippets.

@imryan
Created October 10, 2013 21:51
Show Gist options
  • Select an option

  • Save imryan/6926202 to your computer and use it in GitHub Desktop.

Select an option

Save imryan/6926202 to your computer and use it in GitHub Desktop.
Playing with functions.
#include <iostream>
using namespace std;
double prodSum(double a, double b);
int main(int argc, char *argv[])
{
cout << "enter value for x and y:\n" << endl;
double x = 0;
double y = 0;
cin >> x;
cin >> y;
double product = prodSum(x,y);
cout << product << endl;
}
double prodSum(double a, double b)
{
return a+b;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment