2023-06-07 06:08:12 +00:00
|
|
|
#include <iostream>
|
2023-06-09 16:15:53 +00:00
|
|
|
#include <cstdlib>
|
2023-06-07 06:08:12 +00:00
|
|
|
#include "Spigot.hpp"
|
|
|
|
|
2023-06-09 16:15:53 +00:00
|
|
|
int main(int argc, char **argv) {
|
|
|
|
int numDigits = 0;
|
|
|
|
if(argc < 2) {
|
|
|
|
std::cout << "Usage: spigot <numDigits>" << std::endl;
|
|
|
|
return -1;
|
|
|
|
} else {
|
|
|
|
numDigits = std::atoi((const char *)argv[1]);
|
|
|
|
}
|
|
|
|
Spigot *piSpigot = new Spigot(numDigits);
|
|
|
|
for(int i = 0; i < numDigits; i++) {
|
2023-06-07 06:08:12 +00:00
|
|
|
piSpigot->pump();
|
|
|
|
}
|
2023-06-26 04:22:24 +00:00
|
|
|
std::cout << std::endl;
|
2023-06-07 06:08:12 +00:00
|
|
|
return 0;
|
|
|
|
}
|