From 1c88a4af2bdf25f45cbf87489f8f03d39a54555e Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Fri, 1 Dec 2023 05:28:05 +0000 Subject: Thu, Nov 30, 2023, 9:28 PM -08:00 --- compare.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/compare.c b/compare.c index 6dfbdc8..f6745f1 100644 --- a/compare.c +++ b/compare.c @@ -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"); + } } -- cgit v1.2.3