diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-06 05:16:21 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-06 05:16:21 +0000 |
commit | e76f74f34ef44892f1b8329261199b4d12667ad9 (patch) | |
tree | 877d6c91e929162ffeb040d1fe0839a52f67c981 /wk2/sect2/alpha.c | |
parent | eedf960be55a351b1f17f65c8b85962e26a4abb9 (diff) |
Tue, Dec 5, 2023, 9:16 PM -08:00
Diffstat (limited to 'wk2/sect2/alpha.c')
-rw-r--r-- | wk2/sect2/alpha.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wk2/sect2/alpha.c b/wk2/sect2/alpha.c index 760a865..33bbfd7 100644 --- a/wk2/sect2/alpha.c +++ b/wk2/sect2/alpha.c @@ -7,10 +7,10 @@ int main(void) { string word = get_string("Word: "); int l = strlen(word); - for (int i = 1; i < l; i++) + for (int i = 0; i < l; i++) { // If NOT alphabetical - if (word[i] > word[i - 1]) + if (word[i] > word[i + 1]) { printf("No\n"); return 0; |