my program has to perform these sequences:
[b]1. Prompt the user for desired altitude and a number of steps
2. Cause the balloon to ascend to 1/3 of the specified alltitude, then
cruise for one-quarter of the time steps
3. Repeat step 2 twice more(ascend 1/3, cruise 1/4, ascend 1/3, cruise 1/4)
4. Descend halfway to the ground, cruise for the remaining time steps, and then descend back to the ground
5. After the first balloon flight, the program should ask the user if he would like to continue
I wrote this, but i'm not sure if it's correct[
#include <iostream.h>
#include "balloon.h"
// illustrates use of Balloon class
// balloon (guided by auto-pilot) ascends, cruises, descends
main()
{
Balloon Gina;
Balloon Tina;
int rise; // how high to fly (meters)
int duration; // how long to cruise (seconds)
cout << "How high (in meters) to rise: ";
cin >> rise;
cout << "How long (in seconds) to cruise: ";
cin >> duration;
Gina.Ascend(rise); // ascend to specified height
Gina.Cruise(duration); // cruise for specified time-steps
Gina.Descend(0); // come to earth
cout << "How high (in meters) to rise: ";
cin >> rise;
cout << "How long (in seconds) to cruise: ";
cin >> duration;
Tina.Ascend(rise*1/3);
Gina.Ascend(rise*2);
Tina.Cruise(duration*1/4);
Gina.Cruise(duration *2);
Tina.Descend(0);
Gina.Descend(0);
}