Question: #include #include using namespace std; int main() { int max(int x, int y); if (x return y; } else { return x; } } bool

 #include #include using namespace std; int main() { int max(int x,

#include

#include

using namespace std;

int main()

{

int max(int x, int y);

if (x

return y;

}

else {

return x;

}

}

bool even(int x) {

if (x % 2 == 0) {

return true;

}

else {

return false;

}

}

int lengthString(string s1) {

int i;

for (i = 0; i

return i;

}

This code is given me the error that x and y is defined, above picture is the question and the code is the solution, can someone please fix this one. Thanks

Project: Working with Functions Write a C++ program with a set of functions that performs the following tasks. Test your program and provide a screenshot of the result along with your project. 1. Determines the maximum number given two values int max(int x, int y)..) 2. Determines whether a give number is odd or even. bool even(int x) (...) 3. Determine the number of characters in a string int lengthstring(string s1) (...) Note: A sample example: Lab Assignment 1 Sample.cpp

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!