aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk1/hw1_directory/strap012_1A.cpp
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-06-25 17:55:13 -0500
committerRossTheRoss <msattr@gmail.com>2019-06-25 17:55:13 -0500
commit6c83506cb44b1d20f66df404f0b6468b0e291b6b (patch)
tree8e0475edc2891741862bc9b63844600bdebe6936 /ee1301/wk1/hw1_directory/strap012_1A.cpp
parentM E A N I N G F U L C O M M E N T S (diff)
downloadhomework-6c83506cb44b1d20f66df404f0b6468b0e291b6b.tar
homework-6c83506cb44b1d20f66df404f0b6468b0e291b6b.tar.gz
homework-6c83506cb44b1d20f66df404f0b6468b0e291b6b.tar.bz2
homework-6c83506cb44b1d20f66df404f0b6468b0e291b6b.tar.lz
homework-6c83506cb44b1d20f66df404f0b6468b0e291b6b.tar.xz
homework-6c83506cb44b1d20f66df404f0b6468b0e291b6b.tar.zst
homework-6c83506cb44b1d20f66df404f0b6468b0e291b6b.zip
Do a thing:
Diffstat (limited to 'ee1301/wk1/hw1_directory/strap012_1A.cpp')
-rw-r--r--ee1301/wk1/hw1_directory/strap012_1A.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/ee1301/wk1/hw1_directory/strap012_1A.cpp b/ee1301/wk1/hw1_directory/strap012_1A.cpp
index 96ffcab..abef32d 100644
--- a/ee1301/wk1/hw1_directory/strap012_1A.cpp
+++ b/ee1301/wk1/hw1_directory/strap012_1A.cpp
@@ -1,21 +1,21 @@
-#include <iostream>
-#include <cmath>
-#include <iomanip>
-using namespace std;
-
-int main()
-{
- float r; //Radius
- float h; //Height
-
- cout << "Input the radius of the sphere: ";
- cin >> r;
- cout << "Input the height of the fluid: ";
- cin >> h;
-
- cout << fixed << setprecision(2) //Set rounding to 2 decimal places
- << "Volume of the entire tank: " << ((4.0/3) * M_PI * pow(r, 3)) << endl
- << "Surface area of the entire tank: " << (4 * M_PI * pow(r, 2)) << endl
- << "Volume of the fluid: " << (1.0/3) * (M_PI * pow(h, 2) * (3 * r - h )) << endl
- << "Surface area covered by the fluid: " << (2 * M_PI * r * h) << endl << endl;
+#include <iostream>
+#include <cmath>
+#include <iomanip>
+using namespace std;
+
+int main()
+{
+ float r; //Radius
+ float h; //Height
+
+ cout << "Input the radius of the sphere: ";
+ cin >> r;
+ cout << "Input the height of the fluid: ";
+ cin >> h;
+
+ cout << fixed << setprecision(2) //Set rounding to 2 decimal places
+ << "Volume of the entire tank: " << ((4.0/3) * M_PI * pow(r, 3)) << endl
+ << "Surface area of the entire tank: " << (4 * M_PI * pow(r, 2)) << endl
+ << "Volume of the fluid: " << (1.0/3) * (M_PI * pow(h, 2) * (3 * r - h )) << endl
+ << "Surface area covered by the fluid: " << (2 * M_PI * r * h) << endl << endl;
} \ No newline at end of file