Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream> //библиотека ввода-вывода
- #include <cstdlib> //библиотека для рандома
- using namespace std;
- int main()
- {
- double diametr = rand() % 51 + 1; // 1..50
- double rad = diametr / 2;
- double vis = rand() % 51 + 1; // 1..50
- cout << "Задание:" << endl;
- cout << "Диаметр основания конуса равен " << diametr << ", а длина образующей — $\\sqrt{" << rad * rad + vis * vis << "}$. Найдите площадь осевого сечения этого конуса." << endl;
- cout << "Ответ:" << endl;
- cout << vis * rad << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement