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
In C, developers may access arrays via bracketed syntax like Java or by using * dereferencing notation. The following assignment
Vadim26 [7]

Answer:

See explaination

Explanation:

Square bracket notation is useful when working with objects.

When working with bracket notation, make sure the property identifiers is a String. They can include any characters, including spaces. Variables may also be used as long as the variable resolves to a String.

Below is a representation of the bracket for the question;

a)

racer[0] = 22;

b)

img[1][0] = 89;

c)

img[15][2] = 64;

d)

rgb_img[5][0][1] = 320;

6 0
3 years ago
How would a person giving a persuasive speech use projection to make a key point?
kow [346]

Answer:

<u><em>B: by using a louder voice</em></u>

Explanation:

if Edge quiz then B

8 0
3 years ago
Read 2 more answers
How does a Cloud-first strategy approach a client's migration to the Cloud?by removing outside ecosystem partners from the Cloud
belka [17]

Cloud-first strategies are <em>operating methods</em> wherein teams move all or most of their infrastructure to <em>cloud computing systems</em><em>  </em>such as Web Services, and the further discussion can be defined as follows:

  • It stores assets, including quest and <em>secure resources</em>, in the cloud rather than employing <em>physical resources</em> including such server clusters.
  • This approaches a client's migration to the <em>Cloud by integrating multiple services </em>together to serve the client's business needs.

Therefore, the final answer is "Last choice".

Learn more:

brainly.com/question/1256812

3 0
2 years ago
What is Gamekit Loa3's all questsions
Stells [14]
Video games and currency premium playing
4 0
3 years ago
How can website illustrate cooperations and kidness?
Brilliant_brown [7]
It can illustrate cooperation's and kindness by allowing many different people and strangers to post their opinions and thoughts as long as they are being positive about it! Hope i helped
8 0
4 years ago
Other questions:
  • Which major milestones started off the progression that led to the modern computers we play games on now? What do you think affe
    14·1 answer
  • Tara referred to various information sources while writing her research paper. How can she acknowledge these sources in her docu
    8·1 answer
  • Which of following allows you to share a file with someone that is too large to send via e-mail?
    5·1 answer
  • Which are valid double statements for java? double a = 0; double b = -1.0; double c = -425; double d = 6340; double e = -1.0; do
    12·2 answers
  • Write a pseudocode that will take marks of physics, chemistry and math as input, calculates the average and displays output.
    7·2 answers
  • You want to create Web pages that can easily adapt to and serve multimedia content to smartphones, tablets, gaming devices and s
    13·1 answer
  • What can you do to manually exclude an individual from a recipient list?
    6·1 answer
  • What is the outcome when a floating-point number is divided by zero?
    12·1 answer
  • What is a word processing program? Give examples of word processing programs.
    10·1 answer
  • What is MVC architecture in relation to developing in web applications? How
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!