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) {
|
2024-07-23 16:07:02 +00:00
|
|
|
numDigits = 50000;
|
|
|
|
std::cout << "Defaulting to 50000 digits..." << std::endl;
|
2023-06-09 16:15:53 +00:00
|
|
|
} 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;
|
|
|
|
}
|