From 778220b2e3ce662e733727fb9a560fcfe85c19eb Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Wed, 30 Aug 2023 13:53:53 -0500 Subject: 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. --- factors/uintpow.go | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 factors/uintpow.go (limited to 'factors/uintpow.go') 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 +} -- cgit v1.2.3