diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-09 20:50:35 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-09 20:50:35 +0000 |
commit | fdb240a7c9fad07918f394ac68dab298e655b25b (patch) | |
tree | 9ac8fe7a9124588f9a3916ec36f730b44612fa92 /wk2/pset2 | |
parent | d19e5a1dc4a2e8a81a15f39595d11fd8cabe3f74 (diff) |
Sat, Dec 9, 2023, 12:50 PM -08:00
Diffstat (limited to 'wk2/pset2')
-rw-r--r-- | wk2/pset2/caesar/caesar.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wk2/pset2/caesar/caesar.c b/wk2/pset2/caesar/caesar.c index ba21fb9..246c98c 100644 --- a/wk2/pset2/caesar/caesar.c +++ b/wk2/pset2/caesar/caesar.c @@ -4,7 +4,9 @@ #include <stdlib.h> #include <string.h> + bool only_digits(string phrase); +int rotate(c, i); int main(int argc, string argv[]) @@ -22,6 +24,7 @@ int main(int argc, string argv[]) } } + bool only_digits(string phrase) { for (int i = 0; phrase[i] != '\0'; i++) { if (47 > phrase[i] || phrase[i] > 58) { @@ -31,6 +34,7 @@ bool only_digits(string phrase) { return true; } + int rotate(c, i) { if ((64 < c && c < 91) || (96 < c && c < 123)) { c += i; |