Yes I was wondering if you could help me out on how to add a while loop to this code so that it calls the pump request for pump one and two using a ramdon number generator giving numbers between 1 and 5. The loop should terminate after five requests. Here is the code. Thank you for looking at it.
Randy
#include <iostream.h>
#include "pump.h"
int main()
{
Pump First(1, 50, 1.50);
Pump Second(2, 100, 1.50);
First.current_status();
cout << endl;
First.request(20.0);
cout << endl;
First.newprice(1.60);
First.request(10.0);
First.addgas(50.0);
cout << endl;
First.current_status();
cout << endl << endl;
Second.current_status();
cout << endl;
Second.request(40.0);
cout << endl;
Second.newprice(1.60);
Second.request(20.0);
Second.addgas(100.0);
cout << endl;
Second.current_status();
cout << endl;
return 0;
}