Ok. I'm doing this site's tutorial on C++, and I'm on the lesson about functions. I'm trying to do the multiplication example. But it won't work. here's what i haveWhen i copy and paste it in, it works just fine. What am i doing wrong?Code://a program to test out this whole idea of functions
#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 "<< mult (x,y) << "\n";
cin.get();
}
int mult (int x, int y)
{
return x*y;
}
Never mind. I figured out what i was doing wrong. I need to put a ; after namespace std