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
nexus9112 [7]
3 years ago
8

Write an if/else statement that adds 1 to the variable minors if the variable age is less than 18, adds 1 to the variable adults

if age is 18 through 64 and adds 1 to the variable seniors if age is 65 or older.
if (age < 18) {

minors = minors + 1;

} else if (age > 17 && age < 65) {

adults = adults + 1;

} else {

seniors = seniors + 1;

}
Computers and Technology
1 answer:
boyakko [2]3 years ago
8 0

Answer:

See Explanation

Explanation:

The answer you attached to the question is correct and it does not need any additional input.

However, I'll explain each line for you

This line checks if age is less than 18

if (age < 18) {  

This line increases minors by 1

minors = minors + 1;

}

This line checks if age is between 18 and 64

else if (age > 17 && age < 65) {  

This line increases adult by 1

adults = adults + 1;

}

This line checks if age is greater than 18

else {

This line increases seniors by 1

seniors = seniors + 1;

}

You might be interested in
if the input message is omitted when creating a data validation rule for a cell, no message will appear when the user selects th
pochemuha

Answer:

True.

Explanation:

If the input message is omitted when creating a data validation rule for a cell, no message will appear when the user selects the cell. Data validation rules are used to define the type of data that can be entered into a cell, and the input message is an optional feature that allows you to provide a custom message to the user when they select the cell. If the input message is not specified, no message will be displayed when the user selects the cell.

6 0
1 year ago
Select the three business advantages of globalization.
Anna007 [38]

Answer:

There is increased collaboration in problem solving.

There are increased business opportunities.

It facilitates ease in communication

4 0
3 years ago
Which option ie an example of an html end tag
Kay [80]
Any end tag in HTML needs to look like this, the word body used in this example is one of the more important elements, but you can replace it to any real element in HTML:
i.e. </body>
8 0
3 years ago
Digital _________ Line is a family of point-to-point technologies designed to provide high-speed data transmission over traditio
disa [49]

Answer:

D. Subscriber

Explanation:

Digital Subscriber Line is a family of point-to-point technologies designed to provide high-speed data transmission over traditional telephone lines.

The high speed data transmission property helps to transmit data in a fast and timely manner between two or more points or people during calls, texts and other activities.

6 0
3 years ago
Select all phrases that describe a server-based network. centralized network security easy to expand log-ins controlled by centr
slamgirl [31]

Answer:

Client Server Network ... is the central computer that enables authorized users to access networked resources ... computers in this type of network are connected to a central hub ... why might a business choose a server based network (3) ... 2) easier to expand ... external hardware connected to and controlled by a computer.

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • The system tray contains _____.
    7·2 answers
  • Define a function setheight, with int parameters feetval and inchesval, that returns a struct of type heightftin. the function s
    6·1 answer
  • Which is a example of fixed expense <br><br> -food<br> -clothing<br> -entertainment<br> -rent
    15·2 answers
  • Write a complete function called lowestPosition() which takes as array (of double) and the number of elements used in the array
    9·1 answer
  • Files exist on ____ storage devices, such as hard disks, dvds, usb drives, and reels of magnetic tape.
    11·1 answer
  • Suppose that a program asks a user to enter multiple integers, either positive or negative, to do some calculation. The data ent
    13·1 answer
  • music sites through schools wifi 2020 What is one thing a person should do to stay safe when exercising? 100 pts.!
    10·2 answers
  • Which device doesn't have wifi support? option (1) smartphone, (2) network printer, (3) table fan ​
    5·1 answer
  • PLEASE HELP!!!
    8·1 answer
  • All variables are----------------------------------------------- help please
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!