first commit of version ported line by line from python
Not working correctly yet, errors when handling certain predigits
This commit is contained in:
commit
aac5409a72
6 changed files with 156 additions and 0 deletions
23
Spigot.hpp
Normal file
23
Spigot.hpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef Spigot_h
|
||||
#define Spigot_h
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
class Spigot {
|
||||
public:
|
||||
/* functions */
|
||||
Spigot(int requestedNumDigits);
|
||||
void pump(void);
|
||||
|
||||
private:
|
||||
int numDigits;
|
||||
std::vector<int> spigotList;
|
||||
int spigotListLength;
|
||||
int carry;
|
||||
std::vector<int> preDigits;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue