summaryrefslogtreecommitdiff
path: root/calculator.c
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2023-12-01 06:51:09 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2023-12-01 06:51:09 +0000
commitf779ce2159b3b4843d7bf13f2e8e4e61b0276537 (patch)
treeff442e61731963d5ba55ac0c2221b00ae739a48c /calculator.c
parentaacff5dfbe836f6f373499df925c5396c2371321 (diff)
Thu, Nov 30, 2023, 10:51 PM -08:00
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);
}