Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- double RToL(int R, double Pi)
- {
- return 2 * Pi * R;
- }
- double RToS(int R, double Pi)
- {
- return Pi * R * R;
- }
- double RToSp(double Pi, int R)
- {
- return 4 * Pi * R * R;
- }
- double RToV(int R, double Pi)
- {
- return 1 / 3 * Pi * R * R * R;
- }
- int main()
- {
- setlocale(LC_ALL, "Russian");
- int L = 0, R = 0, S = 0;
- double Pi = 3.14;
- cout << "Величина радиуса: ";
- cin >> R;
- cout << "Длина окружности: " << RToL(R, Pi) << endl;
- cout << "Площадь окружности: " << RToS(R, Pi) << endl;
- cout << "Площадь поверхности сферы: " << RToSp(R, Pi) << endl;
- cout << "Обьем сферы: " << RToV(R, Pi) << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement