I was solving this problem and I'm struck in some problem..could you guys help me out?thanks
Problem: Write the definition of a function that takes as input three numbers and
returns the sum of the first two numbers multiplied by the third number.
solution:
#include <iostream>
#include <conio.h>
#include <math.h>
using namespace std;
int addTwoMultiplyOne(int, int, int);
int main()
{
cout<<addTwoMultiplyOne()<<endl;
getch();
return 0;
}
int addTwoMultiplyOne(int x, int y, int z)
{
cout<<"Enter x,y,z"<<endl;
cin>>x>>y>>z;
return ((x+y)*z);
}