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
Write a program that repeatedly shows the user a menu to select the shape form three main shapes or to print the shapes created
fomenos

Answer:

Explanation:

The following code is written in Python. It creates a program that keeps printing out a menu allowing the user to create shapes. These shapes are saved in an array called shapes. Once the user decides to exit, it prints all of the shapes in the array along with their total area. The output can be seen in the attached picture below. Due to technical difficulties, I have added the code as a txt file below.

3 0
2 years ago
¿Qué creo que debe considerar una empresa para elegir ellugar en el cual va a desarrollar su actividad económica osu emprendimie
zhannawk [14.2K]

Answer:

sorry I don't speak that language

8 0
2 years ago
Who is the best basketball player ever... if you do not say lebron do not comment
Andrews [41]

Kobe was the best basketball player R.I.P

6 0
2 years ago
The blank method returns an integer between the two provided numbers. It can take the value of either of the provided numbers
Elis [28]

Answer:random

Explanation:

A random method returns a number between zero and one.

4 0
2 years ago
As a digital strategist, Jared wants to add something extra to his ads to give users more incentive to click and convert. He's c
nadya68 [22]

Answer:

A) Up to 15 characters in each.

Explanation:

Total characters he can use in each of these optional paths are up to 15 characters in each.

6 0
3 years ago
Other questions:
  • Put the following five steps in the order in which you would perform them to use the Paste Special function: ____. 1. Select and
    5·1 answer
  • What is the difference between chrome and chromium browser?
    9·1 answer
  • Write a program that reads in text from standard input (hint: use Scanner) and prints out the number of words in the text. For t
    5·1 answer
  • Your grandmother was an established artist and left you several original paintings after she died. Which of these statements is
    6·1 answer
  • You are reviewing the style sheet code written by a colleague and notice several rules that are enclosed between the /* and */ c
    12·1 answer
  • William found out that someone used his report on American culture without his permission. What is William a victim of? A. plagi
    7·2 answers
  • Why is it important to evaluate the website on which you plan to shop?
    7·2 answers
  • Which statistical measurement tools should be
    8·1 answer
  • How is binary used in pixels and in sound?
    5·2 answers
  • A customer dictates instruction on how to transcribe audio. Do you have to transcribe the instruction word for word?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!