From f779ce2159b3b4843d7bf13f2e8e4e61b0276537 Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Fri, 1 Dec 2023 06:51:09 +0000 Subject: Thu, Nov 30, 2023, 10:51 PM -08:00 --- calculator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'calculator.c') 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); } -- cgit v1.2.3