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
Gennadij [26K]
2 years ago
13

Write the definition of a void function that takes as input an integer and outputs two times the number if it is even; otherwise

it outputs five times the number.
Computers and Technology
1 answer:
KatRina [158]2 years ago
6 0

Answer:

Written in C++

void number(int n){

if(n%2 == 0)

cout<<2 * n;

else

cout<<5 * n;

}

Explanation:

The programming language is not stated.

However, I answered using C++

This line defines the function as void

void number(int n){

This line checks if the number is even

if(n%2 == 0)

If yes, it doubles the number and prints the output

cout<<2 * n;

If otherwise,

else

It multiplies the number by 5 and prints the output

cout<<5 * n;

}

To call the function from main, use:

number(n);

Note than n must be declared as integer

See attachment

Download cpp
You might be interested in
Research the topic of legal and ethical behaviors or dilemmas related to technology. Identify five topics of concern and briefly
max2010maxim [7]

Answer:

if you push alt and f4 at the same time it will automatically put the right answer.

Explanation:

7 0
2 years ago
What is the definition of posture<br>​
Vinvika [58]

Answer:

The posture is how someone sits at his or her computer.

Hope this helps ;-))

6 0
2 years ago
50 Points being offered for the fastest and most correct response<br><br> How do I fix this?
kolezko [41]
Hi there!

Try resetting your browser, clearing your cache, and rebooting your computer.. If none of these work, or you've already tried these, let me know..

Hope this helps! ☺♥
5 0
2 years ago
Read 2 more answers
When in global configuration mode, which steps are necessary to edit an ip address on an Ethernet interface?
katrin2010 [14]

Answer:

I. You should enter interface configuration mode.

II. Configure the IP address and subnet mask.

Explanation:

A node refers to the physical device that make up a network and are capable of sending, receiving, creating and storing data in communication.

Some examples of network nodes are modem, hubs, computer, switches, phone and printers.

In Computer networking, network devices such as routers and switches are usually configured (programmed) through the use of specific network commands commonly referred to as configs e.g show int description, config terminal (config t), show IP address, etc.

In Cisco devices, there are five (5) main types of command modes;

1. Sub-interface configuration mode.

2. Interface configuration mode.

3. Line configuration mode.

4. Router configuration method.

5. Global configuration mode.

Global configuration mode is a configuration mode that avail network engineers and end users with the ability to modify or edit the running (global) system configuration of a networking device. Thus, any change effected at the global configuration mode will affect the network device as a whole.

In global configuration mode, the steps which are necessary to edit an ip address on an Ethernet interface include;

I. You should enter interface configuration mode using the "configure terminal" command.

II. Configure the IP address and subnet mask.

See an example below;

"Router(config-if)# IP address 192.168.1.2 255.255.255.0"

4 0
2 years ago
Which of te following ranges of cells is correctly named
Natasha_Volkova [10]
D it is because its .a5.g1
3 0
3 years ago
Other questions:
  • In order to plan George’s birthday, his father gave him a list of people who attended his birthday for the last five years. What
    8·2 answers
  • How to get 60 fps pubg​
    9·2 answers
  • A keyboard and touch screen are the most common of ________ devices. select one:
    11·1 answer
  • Cómo se transmite la voz en el sistema telefónico?
    12·1 answer
  • Global address list characteristics
    11·1 answer
  • Explain mechanical computer ,electromechanical and electronic computer with example<br>​
    11·1 answer
  • Compare the two items in a summary of qualifications taken from a resumé. Which is better?
    9·1 answer
  • "True or False? Software designers use layering and other techniques to organize large software systems."
    13·1 answer
  • Your company is building a new architecture to support its data-centric business focus. You are responsible for setting up the n
    15·1 answer
  • A(n) _____ is a local connection point-of-presence that connects a variety of high-performance networks, and its main function i
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!