Select Page

CSCI 2467 Columbus State College Calculate Volume of A Cylinder Java Lab Report

Question Description

MUST BE DONE IN INTELLIJ

CSCI-2467 Lab 1 – Calculate Volume of a Cylinder

Background

The formula for the volume of a cylinder of radius r and height h is: ?r2h

Assignment

Write a Java program that asks the user for the radius and height of a cylinder. The program should then calculate and print the volume of the cylinder. Be sure to include a comment in your code with your name, date, and the purpose of the program.

Start your program as follows:

package edu.cscc;
import java.lang.Math;
import java.util.Scanner;

// TODO – add a comment with your name, date, and program purpose here
public class Main {

private static Scanner input = new Scanner(System.in);

public static void main(String[] args) {
double radius, height, volume;
// TODO – write your program here
}
}

Use the built-in Java constant Math.PI for the value of ?.

Example Output

Enter the radius of the cylinder: 2

Enter the height of the cylinder: 10

The volume of the cylinder is: 125.66370614359172

"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you "A" results."

Order Solution Now