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
Ainat [17]
3 years ago
13

Write the definition of a function printAttitude , which hasan int parameter and returns nothing. The function prints amessage t

o standard output depending on the value of itsparameter.a.If the parameter equals 1, the function prints disagree.b.If the parameter equals 2, the function prints no opinion.c.If the parameter equals 3, the function prints agree.d.In the case of other values, the function does nothing.
Computers and Technology
1 answer:
erastova [34]3 years ago
6 0

Answer:

The function definition to this question can be given as:

Function definition:

void printAttitude(int x1) //define function printAttitude.

{

//nested else-if statements

if(x1==1)

 //if block

cout<<"disagree"<<endl;

//message

else if(x1==2)

 //else if block  

cout<<"no opinion"<<endl;

//message

else if(x1==3)

 //else if block

cout<<"agree"<<endl;

//message

else

cout<<" ";

}

Explanation:

In the above method definition firstly, we define a method that is "printAttitude". In this method, we pass an integer variable that is "x1". This function does not return any value because its return type is void. In this method, we use nested else-if statements. The description of these conditions can be given as:

  • In the if block we check the variable x1 value is equal to 1 If this condition is true. It will print "disagree" otherwise it will go to else-if block.  
  • In the else-if block, we check the variable x1 value is equal to 2 if the condition is true. It will print "no opinion". otherwise, we will go to another else-if block.
  • In this block, we check the variable x1 value is equal to 3 if this condition is true. It will print "agree".otherwise it will go to else block.
  • In the else block it will print nothing.
You might be interested in
I am in class 7 should I go with java or python.​
Kazeer [188]

Answer:python

Explanation:

it’s a good coding program

6 0
2 years ago
What kind is a utility file that shrinks the size of a file
Elena-2011 [213]

Answer:

<u><em>Moxa image resize utility</em></u>

Explanation:

Hope this helped! :)

7 0
3 years ago
Case Study/Scenario: First, Julio clicks Tools from the Chrome menu on the toolbar. Next, he looks for Manage Add-Ons but can no
Margarita [4]

Answer:

Follows are the solution to this question:

Explanation:

Throughout this scenario, Julio chooses the wrong way to handle the add-ons, instead, he opens the option to search and then type add-ons, where the manager can search for add-ons. It is a software extension that provides an application of additional features. It can broaden certain features, introduce additional features to just the interface surface, or provide extra capabilities for both the system.

4 0
3 years ago
In what scenario should dhcp servers also be active dhcp clients?
mrs_skeptik [129]
DHCP stands for Dynamic Host Configuration Protocol. It is protocol responsible for c<span>onfiguring the IP address and other TCP/IP settings on network computers. </span>There is no scenario in which DHCP servers also be active DHCP clients. They should never be both a DHCP server and DHCP client. The two sides (client and server) should be always separated.
4 0
3 years ago
A group consists of 10 kids and 2 adults. On a hike, they must form a line with an adult at the front and an adult at the back.
blsea [12.9K]

Answer:

b. 2.9!

Explanation:

There are is a mistake in the question.

Suppose the group consist of 10 kids and 2 adults, the number of ways in which they can form the line is:

= 2! 10!

= 2× 1× 10!

= 2.10!

But since that is not in the given option.

Let assume that the group consists of 9 kids and 2 adults, the number of ways in which they can form the line is:

No of ways the kids can be permutated =  9 ways

No of ways the adult can be permutated  = two ways.

Thus; the number of ways in which they can form the line = 2! 9!

= 2 × 1× 9!

= 2.9!

6 0
3 years ago
Other questions:
  • Which BI tool or technique would be most useful in predicting the likelihood of a fire in a building? a. Data mining b. Dashboar
    9·1 answer
  • Write a program that asks the user to enter a number within the range of 1 through 10. Use a switch statement to display the Rom
    13·1 answer
  • Which social network site has 1.5 billion actives users per month?
    15·1 answer
  • All of the following are challenges presented by changing technology as it relates to the special events field EXCEPT: A. the ab
    13·1 answer
  • Cognitive psychology is the scientific study of what
    9·1 answer
  • It is a small hand tool used generally in decorative works such as making garnishes
    15·1 answer
  • Columns are labeled with letters and Rows are labeled with numbers.
    5·1 answer
  • Write a program "addnumbers.c" where it takes as many arguments as the user includes as command line arguments and calculates th
    11·1 answer
  • Katy and her associates are approached by an aged tai chi expert to create a website for him. From her participation in an onlin
    9·1 answer
  • HI How are you anyways are any of you intreseted in my giveaway
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!