aboutsummaryrefslogtreecommitdiff
path: root/CST116_Project1_HernandezJimenez_BROKEN.cpp
diff options
context:
space:
mode:
authorBensProgramma <[email protected]>2021-10-16 13:15:37 -0700
committerGitHub <[email protected]>2021-10-16 13:15:37 -0700
commitbe357f308ffd41b8661fc129df0cafea51307d03 (patch)
tree46256d24d717a82f3463f28a6699414df36bd03d /CST116_Project1_HernandezJimenez_BROKEN.cpp
parentAdd files via upload (diff)
downloadcst116-proj1-bensprogramma-be357f308ffd41b8661fc129df0cafea51307d03.tar.xz
cst116-proj1-bensprogramma-be357f308ffd41b8661fc129df0cafea51307d03.zip
Add files via upload
updated CST116_Project1_HernandezJimenez_BROKEN.cpp file with commented documentation of edits completed by Benjamin Schroeder
Diffstat (limited to 'CST116_Project1_HernandezJimenez_BROKEN.cpp')
-rw-r--r--CST116_Project1_HernandezJimenez_BROKEN.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/CST116_Project1_HernandezJimenez_BROKEN.cpp b/CST116_Project1_HernandezJimenez_BROKEN.cpp
index 729fd5b..06941e4 100644
--- a/CST116_Project1_HernandezJimenez_BROKEN.cpp
+++ b/CST116_Project1_HernandezJimenez_BROKEN.cpp
@@ -1,6 +1,11 @@
// CST116_Project1_HernandezJimenez_BROKEN.cpp : This file contains the 'main' function. Program execution begins and ends there.
// **** Original program submitted by Frederico HernandezJimenez with errors 10/15/2021 7:58pm
+//
+//
+//
// **** This program was edited by Benjamin Schroeder 10/15/2021 8:34pm
+// **** - The incorrect code has been commented out with a corrected line entered below the incorrect line
+// **** - edits have been notated with initials BAS
@@ -12,7 +17,7 @@ using namespace std;
int main()
{
//int volume = 0; // These should probably all be a float type ...note:BAS
- float volume = 0.0; // to accept the value of PI ...note:BAS
+ float volume = 0.0; // to work with the float value of PI ...note:BAS
//int Radius = 0;
float Radius = 0.0;
//int Height = 0;
@@ -26,8 +31,8 @@ int main()
cout << "Enter Height: ";
cin >> Height;
- //volume = 3.14 * Radius * Height; // incorrect logic expression for the volume of a cylinder ... note: BAS
- volume = PI * Radius * Radius * Height; // Replaced the line above to give the correct expression ... note: BAS
+ //volume = 3.14 * Radius * Height; // Logic Error incorrect logic expression for the volume of a cylinder ... note: BAS
+ volume = PI * Radius * Radius * Height; // Replaced the line above to give the correct expression ... note: BAS
cout << "The volume of the cylinder is approximately: " << volume << std::endl;