#include "WaterAndOxygen.cpp" int main(int argc, char **argv) { int i; class WaterAndOxygen TheClass; double retval; int remainH20; int remainO2; int costH2O; int costO2; if (argc != 2) { fprintf(stderr, "usage: a.out num\n"); exit(1); } /* remainH20 = ; remainO2 = ; costH2O = ; costO2 = ; */ if (atoi(argv[1]) == 0) { remainH20 = 64; remainO2 = 70; costH2O = 3; costO2 = 7; } if (atoi(argv[1]) == 1) { remainH20 = 99; remainO2 = 102; costH2O = 1; costO2 = 1; } if (atoi(argv[1]) == 2) { remainH20 = 101; remainO2 = 99; costH2O = 1; costO2 = 1; } if (atoi(argv[1]) == 3) { remainH20 = 123456789; remainO2 = 987654321; costH2O = 123; costO2 = 456; } if (atoi(argv[1]) == 4) { remainH20 = 987654321; remainO2 = 123456789; costH2O = 456; costO2 = 123; } if (atoi(argv[1]) == 5) { remainH20 = 0; remainO2 = 0; costH2O = 13; costO2 = 27; } retval = TheClass.maxDays(remainH20, remainO2, costH2O, costO2); cout << retval << endl; exit(0); }