Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Write a program that prompts the user to enter an integer number one-to-five (numbers represent the first five elements in the periodic table) or

image text in transcribed
1) Write a program that prompts the user to enter an integer number one-to-five (numbers represent the first five elements in the periodic table) or enter a negative number to quit. Read in the integer. Error check to see if the number is with-in bounds (one-to-five) - if out of bounds print an error message and start over again, else print out the name of the element. If the user enters a valid integer, using if-else statements print out the name of the entered element. Loop until the user enters a negative number

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_2

Step: 3

blur-text-image_3

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

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions

Question

Determine whether are linearly independent. 2 3 -1 -2, -3 -2.

Answered: 1 week ago