Question
Programming Tasks: Please Answer this in only Basic C Language! CODE SETUP Create and fill arrays with the data for the 12 planets from each
Programming Tasks: Please Answer this in only Basic C Language!
CODE SETUP
- Create and fill arrays with the data for the 12 planets from each of the columns in the table. There should be 4 total arrays of size 12 at this point, but you will make more later. You will use all of these arrays in this Project as you categorize the planets.
- Read in a single integer value from the user, which is the number of planets that the program should include in the remaining calculations and output. For example, if the user enters 6, the program should perform the analysis below for the first 6 planets in the table and produce the sample output shown below.
PLANET RADII IN MILES
- Make an additional array to hold planet radii in miles for each planet. Fill this array by calculating the radius in miles of each planet using the data in your arrays. Note: the radius of Jupiter is 43441 miles. Then, print out the radii (in miles with no decimal places) for all of the planets in a list (see sample output below).
- Create a histogram where the planets are binned (i.e. grouped) based on their radii (see sample output below). Do this by counting the number of planets in the data whose radius falls into the specified ranges (Note: the radii of Earth and Jupiter are 3959 and 43441 miles, respectively.):
~Earth - the planet's radius is between half Earth's radius and twice Earth's radius. >Jupiter - the planet's radius is greater than Jupiter's radius. PLANET DISTANCES TO STAR ~Earth - the planet's distance to its star is between 0.5 AU and 2.0 AU . >Jupiter - the planet's distance to its star is greater than 5.2 AU. Sample Output Here is a complete sample output from the code, where only the first six planets on the list have been included in the investigation The current state-of-the-art methods for finding exoplanets is good at finding very BIG planets that are are very close to their stars, which is not a good combination for the habitability of life. You should see this trend in your histograms. General Comments & Policies
Enter the number of planets to categorize (max 12): 6 Planets: Earth Mars Venus HAT-P-16 K2-29 KELT-4-A Planet radii (in miles): 3959, 2063, 3677, 55995, 51695, 30365 Planets by size:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started