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 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
Get step-by-step solutions from verified subject matter experts
