-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1012.cpp
More file actions
28 lines (23 loc) · 687 Bytes
/
Copy path1012.cpp
File metadata and controls
28 lines (23 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <math.h>
#include <string>
using namespace std;
int main() {
double a, b, c, TRIANGULO, CIRCULO, TRAPEZIODESCENDENTE, BOLAQUADRADA, RETANGULO, PI;
cin >> a >> b >> c;
cout << fixed << setprecision(3);
TRIANGULO = (a * c)/2;
PI = 3.14159;
CIRCULO = (PI * pow(c,2));
TRAPEZIODESCENDENTE = ((a+b)*c)/2;
BOLAQUADRADA = pow(b,2);
RETANGULO = a * b;
cout << "TRIANGULO: " << TRIANGULO << endl;
cout << "CIRCULO: " << CIRCULO << endl;
cout << "TRAPEZIO: " << TRAPEZIODESCENDENTE << endl;
cout << "QUADRADO: " << BOLAQUADRADA << endl;
cout << "RETANGULO: " << RETANGULO << endl;
return 0;
}