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
shutvik [7]
4 years ago
9

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) Then
minors += 1
ElseIf (age < 65) Then
adults += 1
Else
seniors += 1
End If
Computers and Technology
1 answer:
BARSIC [14]4 years ago
3 0

Answer:

if (age < 18)  // check condition of variable age is less than 18

minors=minors+`1;

else if (age >=18 && age <=64)  //check condition of variable age between 18 to 64

adults=adults+1;

else  // check condition of variable age more than 65

seniors=seniors+1;

Explanation:

Here we checks the condition if the  variable age is less than 18 then it increment the value of variable 'minors' by 1  i.e, minors=minors+`1; .

if variable age is 18 through 64 then it increment the value of variable adults by 1 i.e,'adults'=adults+1;  otherwise increment the value of variable 'seniors ' by 1  i.e seniors=seniors+1;

You might be interested in
1. What does VolP stand for? *
kenny6666 [7]
Answer : c

Explanation:
6 0
3 years ago
Read 2 more answers
What is an inode number? Group of answer choices A number that is associated with the file and unique in that particular filesyt
gregori [183]

An Inode number is a number that is related to the file and unique across all file systems in Linux and Unix.

A number that is associated with the file and unique in that particular filesytem.

<u>Explanation:</u>

Whenever any files are created on the system, It is given a file name with a number (inode)is unique. To access this file on the system, the user usually will use the file name. But here, he or she will have to access the file along with an Inode number associated with it.

Where stored as numbers datatype in a table called the Inode table. The Inode table is created only when the file system is created. It shows how many inodes are filled and how many are free. The command “df-i” shows the inode table in Linux

8 0
3 years ago
Mrs Jones had p hens then she decided to buy p more hens. how many hens does she have in all?​
Mars2501 [29]

Answer:

2p

Explanation:

if she had p, then she got p again, she got two p amounts. p+p = p*2 = 2p

6 0
3 years ago
Create an application in Java that asks a user for a number of hours, days, weeks, and years. It then computes the equivalent nu
Nostrana [21]

Answer:

<em>The program written in Java is as follows;</em>

<em>The program takes input for hours, days, weeks and months; </em>

<em>Then the inputs are converted to minutes individually and then summed up</em>

<em>For you to better understand the program,  made use of comments to explain difficult lines,</em>

<em>The program is as follows</em>

import java.util.*;

public class Assignment{

public static void main(String []args){

//This line declares all variables

int hours, days, weeks, years;

Scanner input = new Scanner(System.in);

//This line prompts user for hours input

System.out.print("Hours: ");

//This line accepts input for hours

hours = input.nextInt();

//This line prompts user for days  input        

System.out.print("Days: ");

//This line accepts input for days

days = input.nextInt();

//This line prompts user for weeks input

System.out.print("Weeks: ");

//This line accepts input for weeks

weeks = input.nextInt();

//This line prompts user for years input

System.out.print("Years: ");

//This line accepts input for years

years = input.nextInt();

//This line converts hours to minute

int minute = 60 * hours + 1440 * days + 10080 * weeks + 525600 * years;

//This line prints the equivalent minute of user input

System.out.println(minute +" minutes");

}

}

8 0
3 years ago
What does the following expression evaluate to?: "2 + 8"
lozanna [386]
10 tell me if I’m wrong
7 0
3 years ago
Other questions:
  • This toolbar has icons representing the application's basic operations such as Save and Copy. Drawing Formatting Standard Task
    11·2 answers
  • What is the only real language a computer understands?
    8·1 answer
  • Which creepy character is a user-generated myth in minecraft
    13·1 answer
  • Below is an image from Google Trends that plots Cats and Dogs. It shows a line that is higher for dogs than cats. Choose the mos
    11·1 answer
  • Why might it be a good idea to choose a bus topology?
    6·2 answers
  • 1. The @ symbol is used to denote:​
    7·1 answer
  • ___________ system allows us to talk to any person in the world it any time​
    15·2 answers
  • Free pass if you want it.
    12·2 answers
  • If you want to change your system settings, what should you use
    5·1 answer
  • Businesses around the world all need access to the same data, so there
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!