#include #include "frog.h" void prog1(void); void prog2(void); void prog3(void); void main (void) { cout << "Run frog program 1, 2, or 3? --> "; short x; cin >> x; cout << "\n\n"; if (x==1) prog1(); if (x==2) prog2(); if (x==3) prog3(); } void prog1(void) { frog froggy; int numMoves; cout << "Enter # of moves --> "; cin >> numMoves; for (int k=0; k < numMoves; k++) { int blanks = 40 + froggy.move(); for (int j=0; j "; cin >> distance; do { int blanks = 40 + froggy.move(); for (int j=0; j 0 && distance < froggy.getLocation()) || (froggy.getLocation() < 0 && distance > froggy.getLocation())); cout << "final position = " << froggy.getLocation() << endl; cout << "Number of moves = " << froggy.getMoves() << endl; } void prog3(void) { frog froggy1; frog froggy2; int numMoves1,numMoves2,blanks,together = 0; cout << "Enter # of moves for frog 1 --> "; cin >> numMoves1; cout << "Enter # of moves for frog 2 --> "; cin >> numMoves2; for (int k=0; k < numMoves1 || k < numMoves2; k++) { blanks=40; if (k < numMoves1) blanks += froggy1.move(); else blanks += froggy1.getLocation(); for (int j=0; j