summaryrefslogtreecommitdiff
path: root/calculator.c
diff options
context:
space:
mode:
Diffstat (limited to 'calculator.c')
-rw-r--r--calculator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/calculator.c b/calculator.c
index 6ae31f0..49bf41b 100644
--- a/calculator.c
+++ b/calculator.c
@@ -6,5 +6,6 @@ int main(void)
long x = get_int("x: ");
long y = get_int("y: ");
- printf("%li\n", x + y);
+ float z = (float) x / (float) y;
+ printf("%f\n", z);
}