Question: Goal: Learn to iterate over arrays. Assignment: Write some code that simulates filling the fuel tanks of a rocket before launch. Create an array of

Goal: Learn to iterate over arrays.
Assignment: Write some code that simulates filling the fuel tanks of a rocket before launch. Create an array of doubles named tanks where each element represents a fuel tank's capacity in liters. The user specifies the number of tanks, and then the program should ask the user how full each tank is.
Java Language please!
Sample run (user input enclosed in >):
```
Enter the number of fuel tanks:
10>
Amount of fuel in tank 1:
15>
Amount of fuel in tank 2:
347>
```
Goal: Learn to iterate over arrays. Assignment:

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!