Zinovius Zinovius - 6 months ago 37
C++ Question

I don't know how to fix this multiply

// The code does not execute properly. Try to figure out why.
int multiply(int a, int b)
a * b;

I hope you guys can help me with this code to make it work.

Answer Source

You forgot to return the product!

Replace a * b with return a * b.

When you want a function to give/return a value back, you can use return. This means that the function will return the value.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download