Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Chemistry class, you learned about the different orbits of electrons of an atom and how they are arranged in different patterns. There is the

In Chemistry class, you learned about the different orbits of electrons of an atom and how they are arranged in different patterns.
There is the s-orbital which holds 2 electrons, the p-orbital which holds 6, the d-orbital which holds 10, etc. There is a chart of electron
orbitals to understand how they are populated for a specific atom. Additionally, there is a pattern to how the electrons fill the orbitals.
see the following diagram below.
The rules for filling in the electron orbitals is to follow the diagonals. The electrons will fill in the first orbital before moving to the next.
As shown in the diagram, the order of the orbitals is as follows: 1s,2s,2p,3s,3p,4s,3d,4p,5s,4d,5p,6s,4f,5d,6p,7s,5f,6d,7p. For
example, Sodium (atomic #11), will first fill in the two electrons in the 1s orbital, then the next two electrons in the 2s orbital, the next six
in the 2 p orbital, and finally the last one in the 3 s orbital.
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. See below for some sample output runs.
Enter atomic number: 34
The orbitals for element #34 are:
1s2
2s22p6
3s23p63d10
4s24p4
Enter atomic number: 63
The orbitals for element #63 are:
1s2
2s22p6
3s23p63d10
4s24p64d104f7
5s25p6
6s2
Notes:
You must use nested loops for this program (No hardcoding with 7 printf statements).
Since we have not yet learned about arrays or the string library, you cannot use them for this assignment.
To make printing easier, you may put a space after each entry. (e.g."1s2_")
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

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions

Question

=+11. Nonverbal Communication: Analyzing Nonverbal Signals [LO-5]

Answered: 1 week ago