Question: **please note that i posted this question a few hours ago and the answer iv got was incorrect (progrem didnt work the way it should)

**please note that i posted this question a few hours ago and the answer iv got was incorrect (progrem didnt work the way it should) - so please dont copy past that code.

c++

On the island of Akshay in the North Atlantic, there are ten volcanoes arranged in a circle (periodic boundary conditiond - handle it elegantly), To the regret of the islanders - the volcanoes often erupt.

The soil of the island should survive all these eruptions but once three adjacent volcanoes erupt at least five times each (not necessarily at once) the soil wont stand it, the island will collapse and its inhabitants will have to flee. Write a program that will monitor the eruptions of the volcanoes and alert you as soon as three adjacent volcanoes erupted at least five times each. The program must print the volcanoes numbers in order for the islanders know to run the opposite way. In the main of the program there will be a "while" loop that randomly 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, the plan will print their number and end. The order of the eruption of the volcanoes must also be printed.

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

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