candeegraves4179 candeegraves4179
  • 07-03-2022
  • Computers and Technology
contestada

Write a multi-way if 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

Respuesta :

kf5znb kf5znb
  • 07-03-2022

Note, this is psudocode, because i dont know what language you are coding in.

define a variable: minors

define a variable: adults

define a variable: seniors

define a variable: age

if age <18{

add one to minors

}

else if 18<age<64{

add one to adults

}

else if age >= 65{

add one to seniors

}

Answer Link

Otras preguntas

Three siblings sarah, Dave, and Kate - committed themselves to volunteer 155 hours for a homeless charity to build new housing. Kate worked 10 hours more than S
What are the gases that come to equilibrium between the upper layer of the ocean and the atmosphere?
Name three arthropod head appendages and their functions
One of the Patriots' greatest strengths was their
What is the percentage increase from 108.5 to 145.4
what is a tribulatory
Mike and Bill sell cars for Jangle's Auto. Over the past year they sold 640 cars. Assuming Mike sells 3 times as many as Bill, how many cars did Mike sell?
What did Karl Marx believe was the solution to the injustice and inequality of the bourgeoisie's exploitation of the proletarians regarding the means of product
write each repeating decimal as a fraction in simplest form: 1. 0.4 repeating 2. 0.13 repeating
Dscribe the feelings of the narrator when he consulted medical dictionary in the british museum