Im trying to get my program to do z=x*y and z=z+5.0 but not sure what I am doing wrong.
#include <iostream>
using namespace std;
// Declaration: Tells the compiler how a function is called
int multiply(int x, int y);
int main()
{
// You can compile a call to the function with only a declaration,
// but a definition is required for the code to run.
std::cout << multiply(int x,int y) << '\n';
}
// Definition: Tells the compiler what a function does
int multiply(int x, int y)
{
return x * y;
}
int addition(int z);
int main()
{
std::cout << addition(5.0)<< '\n';
}
int addition(int z)
{
return z+5.0;
}