1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alex73 [517]
3 years ago
6

Write the definition of a function max that has three int parameters and returns the largest.

Computers and Technology
2 answers:
dezoksy [38]3 years ago
7 0

Answer:

int max(int x, int y, int z){

if(x > y && x > z)

return x;

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

return y;

else

return z;

}

Explanation:

I am going to write a c function for this.

The arguments are the values, and it is a int function because it returns an integer. So

The if clause is used to verify the largest value.

int max(int x, int y, int z){

if(x > y && x > z)

return x;

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

return y;

else

return z;

}

g100num [7]3 years ago
4 0

Solution:

The definition of a function max that has three int parameters and returns the largest is given bellow:

def max(x,y,z):

if (x>z and x>y):

return (x)

elif (y>x and y>z):

return y

else:

return z

Thus this is required right answer.

You might be interested in
At year end, Clean123 Inc. has 45500 in cash, 55000 in accounts receivable, 54400 in service equipment, 550 in prepaid insurance
Inessa [10]
Oh ok so yea and why you should but I
8 0
2 years ago
Apple was a pioneer in user interface development, introducing the _____, complete with mouse and screen icons, in the early 198
KiRa [710]

Answer:

The answer is "Option b"

Explanation:

The graphical UI is a kind of user interface, which is used in apple technology. It enables the consumers to use graphic symbols and the main symbol sound signal to communicate with electronic devices rather of text-based consumer interface, type tag commands or code navigation, and wrong option can be described as follows:

  • Option a and Option c both were wrong because the command-line interface is a text-based program, and binary line access via command line.
  • In option d, It is a text-based command, that is used to intact with the user, that's why it is wrong.
7 0
3 years ago
The photo shows a group of girls reacting to comments they have read about a classmate on a social media site.
shepuryov [24]

Answer:

no

Explanation:

beacuse

3 0
3 years ago
Define the missing method. licenseNum is created as: (100000 * customID) licenseYear, where customID is a method parameter. Samp
g100num [7]

Answer:

I am writing the program in JAVA and C++

JAVA:

public int createLicenseNum(int customID){  //class that takes the customID as parameter and creates and returns the licenseNum

       licenseNum = (100000 * customID) + licenseYear;  //licenseNum creation formula

       return(licenseNum);     }

In C++ :

void DogLicense::CreateLicenseNum(int customID){ //class that takes the customID as parameter and creates the licenseNum

licenseNum = (100000 * customID) + licenseYear; } //licenseNum creation formula

Explanation:

createLicenseNum method takes customID as its parameter. The formula inside the function is:

licenseNum = (100000 * customID) + licenseYear;

This multiplies 100000 to the customID and adds the result to the licenseYear and assigns the result of this whole expression to licenseNum.

For example if the SetYear(2014) means the value of licenseYear is set to 2014 and CreateLicenseNum(777) this statement calls createLicenseNum method by passing 777 value as customID to this function. So this means licenseYear = 2014 and customID  = 777

When the CreateLicenseNum function is invoked it computes and returns the value of licenseNum as:

licenseNum = (100000 * customID) + licenseYear;

                     = (100000 * 777) + 2014

                     = 77700000 + 2014

licenseNum = 77702014                                                                                                        

So the output is:

Dog license: 77702014          

To call this function in JAVA:

public class CallDogLicense {

public static void main(String[] args) {//start of main() function

    DogLicense dog1 = new DogLicense();//create instance of Dog class

dog1.setYear(2014); // calls setYear passing 2014

dog1.createLicenseNum(777);// calls createLicenseNum passing 777 as customID value

System.out.println("Dog license: " + dog1.getLicenseNum()); //calls getLicenseNum to get the computed licenceNum value

return; } }

Both the programs along with the output are attached as a screenshot.

3 0
3 years ago
Read 2 more answers
How has technology fragmented the audience for sports and entertainment<br> commodities?
PSYCHO15rus [73]

Technology has indeed made to audience of sports and entertainment increase rapidly.

Explanation:

Years passed, one will have to go to a sports stadium or an event center before he/she can access sports or entertainment.

But in recent years the introduction of internet has made every person who wishes to, to enjoy entertainment or sports in the comfort of his/her home or wherever he/she may find him/her self.

It has even given the opportunity for those who are not able to make time as and when the event is going on to watch or listen to it later.

The internet is one of the powerful tools that help individuals enjoy entertainment and sports across the world.

The invention of television and radio has also increased the ability for a sportsman or an entertainer to get more fans in just a short period of time.

4 0
3 years ago
Other questions:
  • This is a list of commands that tell your computer what to do. A icon B FAT C GUI D menu
    5·2 answers
  • "the file that specifies how netbeans builds and deploys the application when you run the application is called the ____________
    8·1 answer
  • You are an administrator for contoso.com. you have two servers called server1 and server2 that run windows server 2012 and have
    9·1 answer
  • Which of the following Internet protocols is MOST important in reassembling packets and requesting missing packets to form compl
    11·1 answer
  • Please create C program, the task is to implement a function edoublepowerx that has an input parameter x of floating-point value
    11·1 answer
  • Kai notices his laptop is running sluggishly, so he wants to check his system resources for any issues. Which utility can he use
    11·2 answers
  • What can be done to solve unemployment problem?​
    11·1 answer
  • What is the difference between a crosstab query and a subquery?
    11·2 answers
  • Is orgenized maningful and useful data​
    15·1 answer
  • A row-level trigger requires use of the _____ keywords and is executed once for each row affected by the triggering statement.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!