school/cs142/smcquay/midterm2/main.cc
2016-04-06 20:45:34 -07:00

23 lines
509 B
C++

#include <string>
#include <iostream>
#include <cstdlib>
using namespace std;
#include "util.h"
const string usage = "usage: app <number of people> <step>";
int main(int argc, char * argv []) {
if(argc != 3) {
cerr << usage << endl;
return 1;
}
int number_of_people = atoi(argv[1]);
int step = atoi(argv[2]);
vector<bool> people(number_of_people, true);
vector<int> loosers = _play_game(people, step);
cout << loosers[loosers.size()-1] << endl;
return 0;
}