Question: 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

 1) Write a program that prompts the user to enter an

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!