CPP_Basics_Syntax/第一讲 变量、输入输出、表达式与顺序语句/613.cpp

14 lines
329 B
C++
Raw Permalink Normal View History

2023-03-30 15:38:07 +08:00
#include <cstdio>
int main()
{
double A, B, C;
scanf("%lf%lf%lf", &A, &B, &C);
printf("TRIANGULO: %.3lf\n", A * C / 2);
printf("CIRCULO: %.3lf\n", 3.14159 * C * C);
printf("TRAPEZIO: %.3lf\n", (A + B) * C / 2);
printf("QUADRADO: %.3lf\n", B * B);
printf("RETANGULO: %.3lf\n", A * B);
return 0;
}