subject

Write an expression that will cause the following code to print "i am a teenager" if the value of userage is less than 20.
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("i am an adult");
}
else {
system. out. println("i am a teenager");
}
}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
How can a broadcast station be received through cable and satellite systems?
Answers: 1
question
Computers and Technology, 22.06.2019 07:30
Events and conditions that happen within an organization that are somewhat easier to deal with when responding to change are called
Answers: 1
question
Computers and Technology, 22.06.2019 19:00
The fourth generation of computers emerged between 1970s and 1980s. which technological advancement brought about this generation of computers? which computer architecture was used most in this generation?
Answers: 3
question
Computers and Technology, 23.06.2019 09:10
Effective character encoding requires standardized code. compatible browsers. common languages. identical operating systems.
Answers: 1
You know the right answer?
Write an expression that will cause the following code to print "i am a teenager" if the value of us...
Questions
question
Mathematics, 24.06.2021 07:40
question
SAT, 24.06.2021 07:40
question
English, 24.06.2021 07:40
question
Mathematics, 24.06.2021 07:40