Question: Write a C program to prompt the user for an atomic number, and the program will print out the electron orbital chart for that element.

Write a C program to prompt the user for an atomic number, and the program will print out the electron orbital chart for that element. If the user enters a number outside the periodic chart (e.g. above 118) give an error message of "Number is outside the range of atomic numbers." and exit. The output will be an orbital chart, where each entry will contain the orbit number (1-7) followed by the orbital type (s, p, d, f) and finally the number of electrons that are in that orbital. If the final orbital is not fully populated, it should print the actual number of electrons there, not the total possible.
The program should output:
Enter the atomic number: 63
The orbitals for the element 63are:
1s2
2s22p6
3s23p63d10
4s24p64d104f7
5s25p6
6s2
use nested loops for this program
you cannot use arrays or the string library

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!