diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-01 05:28:05 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-01 05:28:05 +0000 |
commit | 1c88a4af2bdf25f45cbf87489f8f03d39a54555e (patch) | |
tree | f8b26497cb716017d347397da4725809d7953378 | |
parent | 3701ed1038a3259388baf25232f4b9ba65ef9158 (diff) |
Thu, Nov 30, 2023, 9:28 PM -08:00
-rw-r--r-- | compare.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -3,12 +3,13 @@ int main(void) { -int x, y; -if (x < y) { - printf("x is less than y\n"); -} else if (x > y) { - printf("x is greater than y\n"); -} else { - printf("x is equal to y\n"); -} + int x = get_int("What's x? "); + int y = get_int("What's y? "); + if (x < y) { + printf("x is less than y\n"); + } else if (x > y) { + printf("x is greater than y\n"); + } else { + printf("x is equal to y\n"); + } } |