// CST116_Project1_HernandezJimenez_BROKEN.cpp : This file contains the 'main' function. Program execution begins and ends there. // **** Original program submitted by Federico "Freddy" HernandezJimenez with errors 10/15/2021 7:58pm // // // **** This program was edited by Benjamin Schroeder 10/15/2021 8:34pm // **** - Original code arrived to Schroeder as a .cp file created in XCode whose text was then was copied to this Visual Studio Project // **** - The incorrect code has been commented out with a corrected line entered below the incorrect line // **** - Edits have been notated with initials BAS #include //#define PI = 3.14; // This seems incorrect Syntax Error ...note: BAS 10/15/2021 using namespace std; int main() { //int volume = 0; // These should probably all be a float type ...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; float Height = 0.0; float PI = 3.14; // Added this variable to incorporate PI, because the #define statement above didn't work ...note: BAS cout << "Enter Radius: "; cin >> Radius; cout << "Enter Height: "; cin >> Height; //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; return 0; }