Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Below is a program I have been working on and can\'t get to work, its fairly sim

ID: 3628621 • Letter: B

Question

Below is a program I have been working on and can't get to work, its fairly simple but I cant get it. I am writing a subprogram named biggest that receives three integer arguments and returns the largest number

#include
using namespace std;
int biggest (int, int, int);
int main()
{ int x,y,z,m;
cout << "enter 3 intergers"<cin >>x>>y>>z;
m=biggest(x, y, z);
cout<< "The biggest is" <return 0;
}

int biggest(int x, int y, int z);

if ((x>y)&&(x>z))
return x;

else if ((y>x)&&(y>z))
return y;

else if ((z>x)&&(z>y))
return z;

}

Explanation / Answer

#include
using namespace std;
int biggest (int, int, int);
int main()
{
int x,y,z,m;
cout << "enter 3 intergers";
cin >>x;

cin>>y;

cin>>z;
m=biggest(x, y, z);
cout<< "The biggest is" <return 0;
}

int biggest(int x, int y, int z)
{
if ((x>y)&&(x>z))
return x;

else if ((y>x)&&(y>z))
return y;

else if ((z>x)&&(z>y))
return z;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote