subject
Computers and Technology, 08.03.2021 19:30 fefebat

Write an expression that will cause the following code to print "less than 18" if the value of userAge is less than 18. import java. util. Scanner;
public class AgeChecker {
public static void main (String [] args) {
int userAge;
Scanner scnr = new Scanner(System. in);
userAge = scnr. nextInt(); // Program will be tested with values: 18, 19, 20, 21.
if (/* Your solution goes here */) {
System. out. println("less than 18");
}
else {
System. out. println("18 or more");
}
}
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:30
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
1. which of the following is a search engine? a) mozilla firefox b)internet explorer c)google d)safari 2. which of the following statements is true? a) all search engines will provide the same results when you enter the same query. b) all search engines use the same amount of advertisements. c) some search engines are also browsers. d) search engines often provide different results, even when you enter the same query.
Answers: 2
question
Computers and Technology, 24.06.2019 08:00
How can smart devices benefit businesses, organizations, and social communities in the global marketplace?
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
Is a type of bullying that takes place when a person intentionally posts negative information about another that is not true
Answers: 1
You know the right answer?
Write an expression that will cause the following code to print "less than 18" if the value of userA...
Questions
question
Mathematics, 03.12.2020 19:20
question
Biology, 03.12.2020 19:20
question
History, 03.12.2020 19:20
question
Mathematics, 03.12.2020 19:20
question
Mathematics, 03.12.2020 19:20
question
Mathematics, 03.12.2020 19:20
Questions on the website: 13722367