• Сделать в Visual Studio C++
    На рисунке изображена деталь. Определить площадь не зарисованой части круга. Использовать подпрограмму-функцию для вычисления площади круга.

    question img

Ответы 3

  • Здравствуйте, не поможете мне пожалуйста с этим? https://znanija.com/task/29761848
    • Автор:

      joel10
    • 5 лет назад
    • 0
  • Здравствуйте, не поможете мне пожалуйста с этим? https://znanija.com/task/29836099
  • #include <iostream>

    double Area_circle(double R)

    {

    static double PI = std::atan(1) * 4;

    return PI * (R*R);

    }

    int main()

    {

    double r_out, r_in_1, r_in_2, r_in_3;

    std::cout << "Enter the radius of the outgoing circles" << std::endl;

    std::cin >> r_out;

    std::cout << "Enter a radius of 1 inner circle" << std::endl;

    std::cin >> r_in_1;

    std::cout << "Enter a radius of 2 inner circle" << std::endl;

    std::cin >> r_in_2;

    std::cout << "Enter a radius of 3 inner circle" << std::endl;

    std::cin >> r_in_3;

    double S = Area_circle(r_out) - Area_circle(r_in_1) - Area_circle(r_in_2) - Area_circle(r_in_3);

    if (S > 0)

    {

     std::cout << "S == " << S << std::endl;

    }

    else

    {

     std::cout << "The inner area of the circles should not be greater than the outer!" << std::endl;

    }

    system("pause");

    return 0;

    }

    • Автор:

      beau88
    • 5 лет назад
    • 0
  • Добавить свой ответ

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years