This commit is contained in:
deck committed 2026-10-03 22:46:44 +02:00
1 parent 904310819d
commit 5ccb168902
1 file changed
+10 -7
+10 -7
View File
@@ -1,11 +1,14 @@
#include <stdio.h>
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;
}