From 5ccb1689026669e6fc4ceb1869e48f28de891d50 Mon Sep 17 00:00:00 2001 From: Jason Pochanke Date: Sat, 3 Oct 2026 22:46:44 +0200 Subject: [PATCH] lesson 3 --- main.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/main.c b/main.c index ab8657e..ee3bd0c 100644 --- a/main.c +++ b/main.c @@ -1,11 +1,14 @@ #include int main(void) { - double test = 0.0; - double test2 = 0.0; - scanf("%lf\n%lf", &test, &test2); - double sum = test+test2; - int intsum = (int)sum; - printf("%f\n%d", sum,intsum); - return 0; + int w, h; + scanf("%d", &w); + scanf("%d", &h); + long long area = w * h; + double ratio = (double)w/h; + printf("%lld \n %.2f", area, ratio); + // TODO: compute the area and the width-to-height ratio, + // then print them on two lines as the exercise describes. + return 0; + }