spigotcpp/main.cpp
A.M. Rowsell 5a4147b750
Some checks are pending
/ build (push) Waiting to run
Added forgejo action
2025-07-21 17:24:57 -04:00

25 lines
679 B
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#include <iostream>
#include <cstdlib>
#include "Spigot.hpp"
int main(int argc, char **argv) {
int numDigits = 0;
if(argc < 2) {
numDigits = 50000;
std::cout << "Defaulting to 50000 digits..." << std::endl;
} else {
numDigits = std::atoi((const char *)argv[1]);
}
Spigot *piSpigot = new Spigot(numDigits);
for(int i = 0; i < numDigits; i++) {
piSpigot->pump();
}
std::cout << std::endl;
return 0;
}