1234567891011121314151617181920212223242526
#include <iostream> #include <stdlib.h> #include <time.h> #include <ctime> using namespace std; int main() { srand( time(0)); int guess1 = rand(); int guess2 = rand(); int guess3 = rand(); int guess4 = rand(); char left('l'); if (guess1 < 50000) guess1 = left; cout << "Leg 1 moved " << guess1 << endl; cout << "Leg 2 moved " << guess2 << endl; cout << "Leg 3 moved " << guess3 << endl; cout << "Leg 4 moved " << guess4 << endl; return 0; }