diff options
| -rw-r--r-- | Bens Broken Code.cp | 31 | ||||
| -rw-r--r-- | Bens Fixed Code.cp | 31 | ||||
| -rw-r--r-- | Broken Project.cp | 31 | ||||
| -rw-r--r-- | Original C++ Project.cp | 31 | ||||
| -rw-r--r-- | debugging and correcting project.pages | bin | 0 -> 174812 bytes |
5 files changed, 124 insertions, 0 deletions
diff --git a/Bens Broken Code.cp b/Bens Broken Code.cp new file mode 100644 index 0000000..e058440 --- /dev/null +++ b/Bens Broken Code.cp @@ -0,0 +1,31 @@ + +#include <iostream> +#include <iomanip> + +using namespace std; + +int main() + +{ + float height; + float radius; + float pi = 3.141592654; + Float volume; + + + cout << "******************************************************************"; + cout << "\n This program will tell you the volume of a cylinder \n"; + cout << "******************************************************************\n"; + cout << "\n\tPlease enter the radius of the cylinder (cm): "; + cin >> radius; + cout << "\n\tPlease enter the height of the cylinder (cm): "; + cin >> height; + + + volume = pi * radius * height; + + + cout << "\n\n\tThe volume of this cylinder is: " << volume << " cm^3\n\n\n "; + + return 0; +} diff --git a/Bens Fixed Code.cp b/Bens Fixed Code.cp new file mode 100644 index 0000000..ab75aac --- /dev/null +++ b/Bens Fixed Code.cp @@ -0,0 +1,31 @@ + +#include <iostream> +#include <iomanip> + +using namespace std; + +int main() + +{ + float height; + float radius; + float pi = 3.141592654; + float volume; + + + cout << "******************************************************************"; + cout << "\n This program will tell you the volume of a cylinder \n"; + cout << "******************************************************************\n"; + cout << "\n\tPlease enter the radius of the cylinder (cm): "; + cin >> radius; + cout << "\n\tPlease enter the height of the cylinder (cm): "; + cin >> height; + + + volume = pi * radius * radius * height; + + + cout << "\n\n\tThe volume of this cylinder is: " << volume << " cm^3\n\n\n "; + + return 0; +} diff --git a/Broken Project.cp b/Broken Project.cp new file mode 100644 index 0000000..7e40fda --- /dev/null +++ b/Broken Project.cp @@ -0,0 +1,31 @@ + + + +#include <iostream> +#define PI = 3.14; +using namespace std; + + +int main() +{ + int volume = 0; + int Radius = 0; + int Height = 0; + + + cout << "Enter Radius"; + cin >> Radius; + + cout << "Enter Height"; + cin >> Height; + + volume = 3.14 * Radius * Height; + + cout << "The volume of the cylinder is approximately" << volume << std::endl; + + + return 0; + +} + + diff --git a/Original C++ Project.cp b/Original C++ Project.cp new file mode 100644 index 0000000..612df5e --- /dev/null +++ b/Original C++ Project.cp @@ -0,0 +1,31 @@ + + + +#include <iostream> +#define PI 3.14; +using namespace std; + + +int main() +{ + int volume = 0; + int Radius = 0; + int Height = 0; + + + cout << "Enter Radius"; + cin >> Radius; + + cout << "Enter Height"; + cin >> Height; + + volume = 3.14 * Radius * Radius * Height; + + cout << "The volume of the cylinder is approximately" << volume << std::endl; + + + return 0; + +} + + diff --git a/debugging and correcting project.pages b/debugging and correcting project.pages Binary files differnew file mode 100644 index 0000000..7a64dda --- /dev/null +++ b/debugging and correcting project.pages |