From 19bf3a62f11be1f356eb2b9e6b66301f6a1cbf93 Mon Sep 17 00:00:00 2001 From: Jason Pochanke Date: Sun, 4 Oct 2026 00:36:26 +0200 Subject: [PATCH] lesson 4 --- main.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/main.c b/main.c index e61e1c2..aea478e 100644 --- a/main.c +++ b/main.c @@ -1,14 +1,16 @@ #include int main(void) { - int w, h; - scanf("%d", &w); - scanf("%d", &h); - long long area = (long long)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; + int nums[5]; + for (int i = 0; i < 5; i++) scanf("%d", &nums[i]); + int best = 0; + for (int i = 0; i<5; i++) { + if (nums[i] > best) { + best= nums[i]; + } + } + + printf("%d\n", best); + return 0; }