Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Make a program will read 3 numbers from the user and tell the largest number. Make the following 4 functions in addition to the

C++

Make a program will read 3 numbers from the user and tell the largest number. Make the following 4 functions in addition to the main.

showProgInfo This function will show the program information shown below.

*****************************************************

This program will ask you to enter 3 numbers and find the largest.

*****************************************************

getNum This function asks the user to enter one number and returns it. Call this function 3 times in the main to get 3 numbers from the user.

findLargest This function finds the largest value among the 3 numbers and returns it.

This is what I have, please I need help

#include

using namespace std;

void showProgInfo();

int getNum(int num1, int num2, int num3);

int largerst(int num1, int num2,int num3);

void printResult(int s,int num1, int num2, int num3);

int main()

{

int num1;

int num2;

int num3;

int largerst;

showProgInfo ();

getNum(num1,num2,num3);

findLargest(num1,num2,num3);

printResult(largets,num1, num2,num3);

return 0;

}

int showProgInfo()

{

cout<<"********************************************************************"<

cout<<" This program will ask you to enter 3 numbers and find the largest. "<

cout<<"********************************************************************"<

}

int getNum(int num1, int num2, int num3)

{

cout<<"Enter a number: ";

cin>>num1>>endl;

cout<<"Enter a number: ";

cin>>num2>>endl;

cout<<"Enter a number: ";

cin>>num3>>endl;

return showProgInfo;

}

int findLargest(int num1, int num2,int num3)

{

int largest=0;

if( num1>num2)

largest=num2;

else

largest= num1;

if(num1

largest=num3;

return largerst;

}

void printResult(int largets,int num1, int num2, int num3)

{

cout<<"The largest number among "<< num1<<", "<

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain the SOAP documentation method.

Answered: 1 week ago

Question

The count ( ) function in the tidyverse is a shorthand for

Answered: 1 week ago