Write a program that lets the user enter a range of prehistoric dates (in millio
ID: 3660031 • Letter: W
Question
Write a program that lets the user enter a range of prehistoric dates (in millions of years), and then outputs the periods that are included in that range. Each time this output is done, the user is asked if he/she wants to continue.within the program, represent the periods with an enumeration type made up of their names. create a function that determines the period corresponding to each identifier in the enumeration. then use a for loop to output the series of periods in the range. periods of geologic time are: Period name: starting date (millions of years) neogene 23 paleogene 65 cretaceous 136 jurassic 192 triassic 225 permian 280 carboniferous 345 devonian 395 silurian 435 ordovician 500 cambrian 570 precambrian 4500 or earlier use functional decomposition to solveExplanation / Answer
#include #include using namespace std; void printResults(int); void getRange(); enum Periods {NEOGENE, PALEOGENE, CRETACEOUS, JURASSIC, TRIASSIC, PERMIAN, CARBONIFEROUS, DEVONIAN, SILURIAN, ORDOVICIAN, CAMBRIAN, PRECAMBRIAN}; int main() { bool goAgain = true; Periods finRange; int range[2]; while(goAgain) { range = getRange(); printResults(range); goAgain = askAgain(); } system ("pause"); return 0; } void printResults(int finRange); { coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.