Lesson 4: Functions noob question
I dont understand this can somone explane it for me?
Code:
#include <iostream>
using namespace std;
int mult ( int x, int y );
int main()
{
int x;
int y;
cout<<"Please input two numbers to be multiplied: ";
cin>> x >> y;
cin.ignore();
cout<<"The product of your two numbers is "<< mult ( x, y ) <<"\n";
cin.get();
}
int mult ( int x, int y )
{
return x * y;
}
the tutorial sort of lost me .
plus i dont get the whole return thing....
and what is cin exactly? the name seems to have nothing to do with what it does! cin.get? cin.ignore? and then they used cin>> x >> y!