summaryrefslogtreecommitdiff
path: root/compare.c
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2023-12-01 05:28:05 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2023-12-01 05:28:05 +0000
commit1c88a4af2bdf25f45cbf87489f8f03d39a54555e (patch)
treef8b26497cb716017d347397da4725809d7953378 /compare.c
parent3701ed1038a3259388baf25232f4b9ba65ef9158 (diff)
Thu, Nov 30, 2023, 9:28 PM -08:00
Diffstat (limited to 'compare.c')
-rw-r--r--compare.c17
1 files 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");
+ }
}