Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In my CSC class we are doing an if statement lab where we have to code in JAVA. The first problem is: Prompt the user

In my CSC class we are doing an if statement lab where we have to code in JAVA.

The first problem is:

Prompt the user to input someone's age and output five statements that report whether that person can create a Facebook account (13), get a drivers license (16), vote (18), legally consume alcoholic beverages (21) or run for President of the US (35). DO NOT duplicate output statements in your code.

WHAT IS THE CODE IN JAVA?

image text in transcribed

CSC100 if statements lab Prompt the user to input someone's age and output five statements that report whether that person can create a Facebook account (13), get a driver's license (16), vote (18), legally consume alcoholic beverages (21) or run for President of the US (35). DO NOT duplicate output statements in your code. 1. SAMPLE INPUT: 17 At age 17, a person may create a Facebook account At age 17, a person may get a driver's license At age 17, a person is not old enough to vote. At age 17, a person is not old enough to legally drink alcohol At age 17, a person is not old enough to run for President. TEST DATA: 12 5 2025 40

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Implementing Ai And Machine Learning For Business Optimization

Authors: Robert K Wiley

1st Edition

B0CPQJW72N, 979-8870675855

More Books

Students also viewed these Databases questions

Question

List out some inventory management techniques.

Answered: 1 week ago