Compare commits

..

3 Commits

Author SHA1 Message Date
flykhan 657ee0dbbf 最大值 2023-03-30 16:31:31 +08:00
flykhan 1b88461434 工资和奖金 2023-03-30 16:25:46 +08:00
flykhan cb6e3749ee 平均数2 2023-03-30 16:12:36 +08:00
3 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#include <cstdio>
int main()
{
float a, b, c;
scanf("%f%f%f", &a, &b, &c);
printf("MEDIA = %.1f\n", (a * 2 + b * 3 + c * 5) / (2 + 3 + 5));
return 0;
}

View File

@ -0,0 +1,10 @@
#include <cstdio>
int main()
{
char name[10];
double a, b;
scanf("%s%lf%lf", &name, &a, &b);
printf("TOTAL = R$ %.2lf\n", a + b * 0.15);
return 0;
}

View File

@ -0,0 +1,13 @@
#include <cmath>
#include <cstdio>
int main()
{
int a, b, c;
int max;
scanf("%d%d%d", &a, &b, &c);
max = (a + b + abs(a - b)) / 2;
max = (max + c + abs(max - c)) / 2;
printf("%d eh o maior", max);
return 0;
}