summaryrefslogtreecommitdiff
path: root/compare.c
diff options
context:
space:
mode:
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");
+ }
}