//In the next 30 minute, I will be comepleting the code for the cylinder volume calculator. I will also create a version with errors. // I know the equation for the volume of a cylinder and how to get user input. // I don't know if the volume will need to be a float or a double to contain a long decimal chain. // // Pseudo Code // 1. Define variables for radius and height of a cylinder. // 2. Ask user for input of radius and height. // 3. Calculate volume of a cylinder with these perameters and print //Jeffrey Wiser //jeffrey.wiser@oit.edu //We met in class the day after the assignment was given to swap our codes. #include #include using namespace std; int main() { //define variable float radius = 0; float height = 0; double volume = 0; //ask for user input radius cout << "Please enter the radius: "; cin >> radius; //ask for user input height cout << "Please enter the height: "; cin >> height; //calculations volume = radius * radius * height * 3.14159; //output answer cout << "The volume of the given cylinder is: " << volume << " units cubed.\n"; return 0; }