Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- double max(double a, double b) {
- if (a > b)
- return a;
- else
- return b;
- }
- int main() {
- setlocale(LC_ALL, "rus");
- double x, y, z, l1, l2, l3;
- cout << "Введите значения радиуса трех окружностей: " << endl;
- cin >> x >> y >> z;
- l1 = 2 * acos(-1.0) * x;
- l2 = 2 * acos(-1.0) * y;
- l3 = 2 * acos(-1.0) * z;
- cout << "Наибольшая длина равна: " << max(max(l1, l2), l3);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement