Advertisement
SteelK

Untitled

Jun 11th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     double rad = (rand() % 50 + 1) / 2.0;
  9.     double vis = (rand() % 50 + 1) / 2.0;
  10.     double obr = rad * rad + vis * vis;
  11.     double area = vis * rad;
  12.  
  13.     cout << "Задание:" << endl;
  14.     cout << "Высота конуса равна " << vis << ", а длина образующей —  $\\sqrt{" << obr << "}$. Найдите площадь осевого сечения этого конуса." << endl;
  15.     cout << "Ответ:" << endl;
  16.     cout << vis * rad << endl;
  17.  
  18.     return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement