Please Note Posted Question Hours Ago Answer Iv Got Incorrect Progrem Didnt Work Way Pleas Q43818016
**please note that i posted this question a fewhours ago and the answer iv got was incorrect (progrem didnt workthe way it should) – so please dont copy past thatcode.
c++
On the island of Akshay in the North Atlantic, there are tenvolcanoes arranged in a circle (periodic boundary conditiond -handle it elegantly), To the regret of the islanders – thevolcanoes often erupt.
The soil of the island should survive all these eruptions butonce three adjacent volcanoes erupt at least five times each (notnecessarily at once) the soil wont stand it, the island willcollapse and its inhabitants will have to flee.
Write a program that will monitor the eruptions of the volcanoesand alert you as soon as three adjacent volcanoes erupted at leastfive times each. The program must print the volcanoes numbers inorder for the islanders know to run the opposite way.
In the main of the program there will be a “while” loop thatrandomly grilling the volcano that will erupt in such a way:
while(){
int mountain_num = rand()%10;
}
Add arrays, functions, and conditions if necessary (of course,for a “while” – conditions must be entered).
Once three adjacent volcanoes erupt at least five times each, theplan will print their number and end.
The order of the eruption of the volcanoes must also beprinted.
Example (for at least three eruptions, not five)
Volcanic eruptions (by volcanoes numbers):0,8,3,0,9,2,8,4,5,8,0,7,7,4,9,6,8,1,9
volcanoes 8,9,0 experience volcanic eruptions! run away
please try to write simple code (as simple as you can),so ill be able to understand it. thank you so much
Expert Answer
Answer to **please note that i posted this question a few hours ago and the answer iv got was incorrect (progrem didnt work the wa…
OR