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
PLEASE HELP WILL GIVE BRAINLIEST!
fgiga [73]

Answer:

(1BD.63B851EB851EB851EB85)₁₆

Explanation:

7 0
4 years ago
Read 2 more answers
Select the correct text in the passage.
Serjik [45]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

As you know that noise distracts the process of communication. It is anything that distorts a message between two communicators. Noise can take many forms, such as playing the radio in the background, another person interfering with the conversation, and any other distraction that prevent the receiver from paying attention to what the sender is saying.

So, in this question, the noise phrase in the given passage is written in bold.

<em>Ben wanted to call his friend Kevin for a game of football. He rang up Kevin and was about to mention the game.</em> Just then, a car nearby honked loudly. <em>Kevin said that he couldn’t hear what Ben said. Ben then repeated what he had said earlier.</em>

A car honked nearly when Ben and Kevin are communicating with each other is considered noise. A car honked is a noise in the process of communication.    

4 0
3 years ago
Which is many many years of vot in nepal.​
Butoxors [25]

Answer:

18 yrs

Explanation:

3 0
3 years ago
The system log daemon, rsyslogd, creates a socket for other system processes to write to. what is the path to this socket?
Vlada [557]

If the system log daemon, rsyslogd, creates a socket, the path to this socket is known to be /dev/log.

<h3>What is the system log daemon?</h3>

The syslog daemon is known to be a kind of a server process that is known to often gives or provides a form of message logging tools that is made for application and system processes.

Note that the syslog daemon is said to be one that begins by the Internet Daemon and it is also one that tend to receives messages on well-known port such as  514.

Note that The syslog daemon must be on before any application program and as such, If the system log daemon, rsyslogd, creates a socket, the path to this socket is known to be /dev/log.

See full question below

The System Log Daemon, rsyslogd, creates a socket for other system processes to write to. What is the path to this socket?

Select one:

a. /etc/rsyslog.socket

b. /var/log.sock

c. /tmp/log

d. /dev/log

Learn more about system log from

brainly.com/question/25594630

#SPJ1

6 0
2 years ago
The data I collect in Google Forms are all compiled in a spreadsheet for me.<br> False <br> True
Mandarinka [93]
I think it's false. If I'm wrong then sorry.
5 0
4 years ago
Read 2 more answers
Other questions:
  • An example of an email client is:<br> A.)Yahoo<br> B.)Gmail<br> C.)Outlook<br> D.)All of the Above
    9·1 answer
  • 1 what elements of composition are under your control in photoshop
    13·1 answer
  • Many computer users and some operating systems call subdirectories ____.
    10·1 answer
  • Write three tasks students can preform in a digital classroom?
    9·2 answers
  • Why is it important to use the binomial nomenclature system?
    6·1 answer
  • A part-time job performed while in high school must have the approval of your school counselor.
    7·2 answers
  • What are the characteristics of 1st generation computers​
    9·2 answers
  • State the steps for opening Ms word Application ​
    7·1 answer
  • Select the best answer from the drop-down menu.
    14·2 answers
  • Computer science is a blank process
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!