Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The purpose of this challenge is to use looping ( WHILE ) and conditional constructs ( IF - ELSE, IF - ELSE - IF ,

The purpose of this challenge is to use looping (WHILE) and conditional constructs (IF-ELSE, IF-ELSE-IF, nested IF statements). This challenge simulates a hotel reservation system.
Requirements
Ask the user to enter their first name. Don't forget to first declare a variable for the first name.
Ask the user to enter their last name. Don't forget to first declare a variable for the last name.
Ask the user to enter their age. Don't forget to first declare a variable for the age.
If the user is younger than 21 yrs old, display a message indicating that they cannot make a hotel reservation and ask the user again to enter a valid age. HINT: This is Input Validation that uses a WHILE loop. The program won't continue past this point if the user keeps entering an age younger than 21.
image text in transcribed

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

Multidimensional Array Data Management In Databases

Authors: Florin Rusu

1st Edition

1638281483, 978-1638281481

More Books

Students also viewed these Databases questions

Question

A focus of the Agile software development methodology is

Answered: 1 week ago

Question

Create a workflow analysis.

Answered: 1 week ago