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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 22:30, kayelynn003
How many points do i need before i can send a chat
Answers: 1
image
Computers and Technology, 24.06.2019 02:10, trint5952
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
Answers: 2
image
Computers and Technology, 24.06.2019 14:00, maddi0132
In the microsoft® access® and microsoft excel® programs, the ribbon contains tabs that are divided into with like tools in them. parts groups containers bunches
Answers: 1
image
Computers and Technology, 25.06.2019 02:30, Nismo3501037
What are the charges for invasion of privacy on computers
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 in other subjects:

Konu
Mathematics, 01.07.2021 23:30