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
Alinara [238K]
2 years ago
8

Get user input as a boolean and store it in the variable tallEnough. Also, get user input as a boolean and store it in the varia

ble oldEnough. Then, use the two boolean variables to decide whether the user is able to ride the rollercoaster. The only time the user can ride the rollercoaster is if the responses to both answers is true. Use a logical operator to decide whether the user is eligible to ride. Print true or false depending on whether the user can or can’t ride the rollercoaster.
Computers and Technology
1 answer:
frozen [14]2 years ago
8 0

Answer:

I will code in JAVA.

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

 

boolean tallEnough;

boolean oldEnough;

Scanner input = new Scanner(System.in);

tallEnough = input.nextBoolean();<em> //wait the input for tallEnough</em>

oldEnough = input.nextBoolean(); <em>//wait the input for OldEnough</em>

   if(tallEnough && oldEnough){

   System.out.print(true);

   } else {

   System.out.print(false);

   }

}

}

Explanation:

First, to accept user inputs you have to import the class Scanner. Then declare both variables before allowing the user to set input values for both boolean variables.

In the if-else statement checks if both variables are true, then prints true. Another case prints always false.

You might be interested in
The appropriate length for an e-mail is about half the amount of text that will fit on an 8 1/2' by 11' page.
lys-0071 [83]

Wrong..............................................

7 0
2 years ago
Read 2 more answers
Write an example method that overrides the operator to create a new book whose title is a concatenation of the titles of two boo
Anastasy [175]

next time m8 mmmmmdsaasd

5 0
3 years ago
How do I add my bestie on brainy? /??!!! ​
ziro4ka [17]

Answer:

You have to remember their name on here

Explanation:

If u dont you cant talk to them again

3 0
2 years ago
After sending input in the Chinese language to an AI system, Nina got numerous translations in the English language. Which chall
ad-work [718]

Answer:

i think its translation complexity

Explanation:

8 0
3 years ago
Which best describes the benefits of renting a home?
arlik [135]
The benefit of actually growing up.
5 0
3 years ago
Other questions:
  • Which of the given original work is protected by the copyright law
    9·1 answer
  • A(n ____ enables a database administrator to define schema components.
    10·1 answer
  • Hy i am new anybody here​
    10·2 answers
  • True / False<br> The exponent in floating point is stored as a biased value.
    9·1 answer
  • Because Microsoft Access includes not only the software needed to create a database, but also the software needed to create form
    7·1 answer
  • What does the internet engineering task force (IEFT) do?
    5·1 answer
  • Which symbol is used for an assignment statement in a flowchart?
    13·1 answer
  • Which type of evidence should victims collect to help officials catch cyber bullies?home addressesbirthdayssocial media username
    15·1 answer
  • Lattice-based access controls use a two-dimensional matrix to assign authorizations. What are the two dimensions and what are th
    6·1 answer
  • The direction of a ratchet is reversed by _______________________.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!