Question: first design and test your struct and basic I / O functions: Your struct must, at a minimum, have fields for: the atomic number, the

first design and test your struct and basic I/O functions:
Your struct must, at a minimum, have fields for: the atomic number, the name of the element, the symbol, the
atomic mass, the electron configuration and the group to which the element belongs (The elements below are
listed in this order). Choose an appropriate data type/structure for each element (e.g. int, double, string, array,
etc.). Test data for this version of the program:
1 Hydrogen H non_metal 1.011000000 other_non-metals
11 Sodium Na alkali_metal 22.98982810000 alkalai_Metals
79 Gold Au transition_metal 196.97281832170 post-transition_metals
NOTE: even if you dont understand what each of these properties means (look them up!), you dont need that
information to choose appropriate data types and write appropriate code which depends only on the type of data
being processed and how you decide to organize that data...
Write functions to input data into the struct from the keyboard (stdin), print out the information in the struct and
determine if two structs represent the same data. Sample code for these operations was demonstrated in class
and is available on Canvas as parts of the Planets examples. You should write the code for these operations and
write a driver to test their function. The required submission for lab 10 is a copy of your code with several
sample outputs

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 Programming Questions!