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]
3 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]3 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
Drag the tiles to the correct boxes to complete the pairs.
Mice21 [21]

Answer:

Operation open purpose

8 0
3 years ago
Read 2 more answers
What did you predict will happen? Check all that apply. The lioness will attack Thisbe. Thisbe will stay hidden in the cave to a
sesenic [268]

Hi,


Everything applies. It is impossible to predict based on the current data. All scenarios are possible with equal possibility.


Hope this helps.

r3t40

5 0
3 years ago
Read 2 more answers
A unique feature of which browser is an opening screen that features a different image each day with embedded links?
deff fn [24]
The <span>Bing homepage brings you to a page that has a different image as the background everyday, a search box and links to news so I think that's the right answer. You can have a look: </span>https://www.bing.com/
6 0
3 years ago
Read 2 more answers
What is the predecessor for the internet??
Gennadij [26K]
The predecessor for the Internet is ARPANET . ARPANET was developed under the direction of the U.S. Advanced Research Projects Agency (ARPA) and first published in 1967.It was <span>designed to facilitate communication between ARPA computer terminals .</span>This network was the first fully operational packet-switching network.
4 0
3 years ago
which of the following is required to establish a new network switch and configure its IP address for the first time
dlinn [17]

Out-of-band management is required to establish a new network switch and configure its IP address for the first time.

<h3>What is Out-of-Band management?</h3>

Out-of-Band management is known to be a form of services that makes sure that a tech do not require to be sent onsite and it is one where remediation can be done in a remote place.

Hence,  Out-of-band management is required to establish a new network switch and configure its IP address for the first time.

See full question below

Which of the following is required to establish a new network switch and configure its IP address for the first time?

A. Client-to-site VPN

B. Site-to-site VPN

C. Out-of-band management

D. In-band management

Learn more about IP address from

brainly.com/question/24930846

#SPJ1

6 0
2 years ago
Other questions:
  • WILL GIVE BRAINLIEST PLEASE HELP / urgent
    9·1 answer
  • The inflationary gap occurs when you obtain no increase in output, but only an increase in the Average Price Level from an incre
    13·1 answer
  • Which data type stores images and audio visual clips?
    9·2 answers
  • How many pounds must a sand bag weigh to test if a safety net can absorb the proper amount of force? A. 150 lbs. B. 200 lbs. C.
    14·2 answers
  • Within the sites that support disaster recovery, ___________ is a separate and fully equipped facility where the company can mov
    6·1 answer
  • DRAG DROP -A manager calls upon a tester to assist with diagnosing an issue within the following Python script:#!/usr/bin/python
    11·1 answer
  • Which statement best defines the Control Pannel?
    12·1 answer
  • See if you can do better then I did
    14·1 answer
  • How to add links in HTML? ​
    8·1 answer
  • What is a symbol such as a heavy dot or another character that precedes a text in a power point
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!