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
SOMEONE HELP ME!!!!!
Oliga [24]

Answer:

I don't see the question

Explanation:

5 0
2 years ago
What was the original intention for the creation of ARPANET?
Anika [276]

ARPANET was the network that became the 'basis' for the Internet. It was based on a concept first published in 1967. It was developed under the direction of the U.S. Advanced Research Projects Agency (ARPA). In 1969, the idea became a modest reality with the interconnection of four university computers.

3 0
2 years ago
Read 2 more answers
When doing a complex presentation, which of the following would be the best tool to begin designing your presentation?
Tomtit [17]

Answer:

B.) Open Office Impress

Explanation:

The options are:

A.) Open Office Writer

B.) Open Office Impress

C.) an outline

D.) photographs

Out of the above, the Impress is used for doing complex presentation, and its one of the best tool for it like PowerPoint. Its quite the same as PowerPoint, and it supports both ppt format as well as odp or the open document presentation format. You can make very complex presentations with the help of the Open office Impress.

7 0
3 years ago
Read 2 more answers
When one makes a social media post, what happens on other devices with the same app?
victus00 [196]

Answer:

An alert appears on the other devices

Explanation:

On social media platforms, whenever some one make a post, all the person who are using that social media app and present in the friend circle of that particular person receive an alert containing the information of the post.

The alert that received by different users on a social media platform is known as Notification. This notification is a type of text, in which the activity performed by post creator is mentioned, this text is received with the tone called notification tone.

The purpose of the alert is to informs the friends who are using that social media platform that a post has been published by someone.  

8 0
3 years ago
What type of microscope requires a nonmetal sample to be prepared for viewing by coating it with a thin layer of a conductive ma
zheka24 [161]

The answer is a Scanning Electron Microscope

It is important to obtain and prepare proper samples when using SEM. The sample’s size, state, and shape are things that should be considered before the sample preparation. Some samples need to be coated. Most metals require no preparation since they can easily conduct electricity. Non-metals, however, needs to be coated with a thin layer of gold. Gold is the ideal non-metal and works most of the times.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is another name for cinematographers? (Select all that apply). lighting specialists production manager di
    8·1 answer
  • We can see spreadsheet results graphically by creating:
    15·1 answer
  • Torque is defined as _____.
    7·1 answer
  • 4. An outline is most like which of the following? (1 point)
    14·1 answer
  • a rule that states each foreign key value must match a primary key value in the other relation is called the
    5·1 answer
  • Services such as water, electricity, and phone communications are called:
    7·1 answer
  • 17. When an industrial electrical circuit requires a 220 VAC single phase power supply, the electric power supply circuit is nor
    7·1 answer
  • Which graph is the solution to the system 2x – 3 and y &lt; 2x + 4?
    5·2 answers
  • DO NOT ANSWER FOR JUST POINTS
    8·2 answers
  • Write a one page report describing the computer the client used, who else had access to it and other relevant findings. Referenc
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!