diff options
| author | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-08-30 13:53:53 -0500 |
|---|---|---|
| committer | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-08-30 14:05:09 -0500 |
| commit | 778220b2e3ce662e733727fb9a560fcfe85c19eb (patch) | |
| tree | 38d18d3db70943b42a62f1f786777022e954bd87 /factors/uintpow.go | |
| parent | b9164fb5b41136a63391f5675a848ec4a7711cb6 (diff) | |
Add digit map calculation
This is not in the output yet, but it will be soon - printing it is
another task since I want colours in my output.
Diffstat (limited to 'factors/uintpow.go')
| -rw-r--r-- | factors/uintpow.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/factors/uintpow.go b/factors/uintpow.go new file mode 100644 index 0000000..85db67f --- /dev/null +++ b/factors/uintpow.go @@ -0,0 +1,9 @@ +package factors + +func uintpow(a, b uint) uint { + result := uint(1) + for i := uint(0); i < b; i++ { + result *= a + } + return result +} |
