summaryrefslogtreecommitdiff
path: root/wk5/pset
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-04-29 02:17:28 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-04-29 02:17:28 +0000
commitdcd864f394fb22fb772f83f8d46ce9166b80bb07 (patch)
tree7b437a4537799d00a663131e5b8d79f31d3e8717 /wk5/pset
parenta664bf7383b41c5f266485454154b516e4d1e164 (diff)
Sun, Apr 28, 2024, 7:17 PM -07:00
Diffstat (limited to 'wk5/pset')
-rw-r--r--wk5/pset/speller/test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wk5/pset/speller/test.c b/wk5/pset/speller/test.c
index 1b03355..bc5055f 100644
--- a/wk5/pset/speller/test.c
+++ b/wk5/pset/speller/test.c
@@ -9,12 +9,12 @@
// Hashes word to a number
int main(void)
{
- char *word = "cat";
+ char *word = "scatter";
// (sum of (letter - 'A') % 26) of a word to get a value of where to store it in the hash table
int val = 0;
for (int i = 0; word[i] != '\0'; i++)
{
val += toupper(word[i]) - 'A';
}
- return val %= 26;
+ printf("%i\n", val %= 26);
}