Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- double x;
- // int a, b, c;
- void input() {
- cout << "Enter x: ";
- cin >> x;
- // cout << "Enter a: ";
- // cin >> a;
- // cout << "Enter b: ";
- // cin >> b;
- // cout << "Enter c: ";
- // cin >> c;
- }
- double volumeTetrahedron(const double x) {
- return (x * x * x * sqrt(2.0)) / 12;
- }
- int main() {
- input();
- // while (b < a) {
- // cout << "Input range again:\n";
- // input();
- // }
- cout << "Result = " << volumeTetrahedron(x);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement