Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners program calculateCylinderVolume

Have Programming Question? Ask it here!
 
 
 


nandagirirajesh
program calculateCylinderVolume
1 Answer(s)      3 years and 9 months ago
Posted in : Java Beginners


program calculateCylinderVolume


Advertisement
View Answers

December 13, 2010 at 2:53 PM


Hi Friend,

Try the following code:

import java.util.*;
class CalculateCyliderVolume
{
    public static void main(String[] args) 
    {   
        double PI=3.14;
        Scanner input=new Scanner(System.in);
        System.out.print("Enter Radius: ");
        double r=input.nextDouble();

        System.out.print("Enter Height: ");
        double h=input.nextDouble();

        double volume=PI*r*r*h;
        System.out.println("Volume of Cylinder: "+volume);
        }
}

Thanks



Related Tutorials/Questions & Answers:
program calculateCylinderVolume
program calculateCylinderVolume  program calculateCylinderVolume
program
program  any program of hotel or school management
Advertisements
program
program  write a javascript program to create a application form with validation
program
program  program of jdbc using ms access for creating table
program
program   Write a program to find the difference between sum of the squares and the square of the sums of n numbers
program
program  write a program reversee a string. input-hi this is roseindia output-roseindia is this hi
program
program  develop a servlet to insert the data in the database from our program in the table stored in the database
program
program  WAP a java program to form 1/2+3/4+5/6+7/8 series
program
program   An old-style movie theater has a simple profit program. Each customer pays $5 per ticket. Every performance costs the theater $20, plus $.50 per attendee. Develop the program calculateTotalProfit that consumes
program
program  explanation of program on extending thread class   Hi Friend, Please go through the following link: Java Threads Thanks
program
program  Develop the program calculateCylinderArea, which accepts radius of the cylinder's base disk and its height and computes surface area of the cylinder
program
program  write a java program to input a no. and print wheather the no. is a special no or not. (special no. are those no whose factorial of the sum of digit of the no is same as the original
program
program  Develop a program that computes the distance a boat travels across a river, given the width of the river, the boat's speed perpendicular to the river, and the river's speed. Speed is distance/time, and the Pythagorean
program
program  how to improve programming skills plss tell some tips..i am understanding concepts but unable to write program so,pls give some guideness plsss
Program
Program  a program to prove that default constructor of super class is available to subclass by default. Define a parameterize constructor for super class to store name = ‚??Tommy‚?? age=‚??23‚?? and call this constructor
Program
Program  a program to create two classes Commercial and Domestic. Override the method calculatebill() of Commercial class(Rs.8 per unit) into Domestic class(Rs 6 per unit) to compute electricity bill for both classes
program
program  no i want a program that shows how merge sort algorithm works in graphical representations like numbers are taken in circles and computation... in rectangles or circles wat ever it may be. the theme of program is to show algorithm
program
program  . Develop a program that accepts an initial amount of money (called the principal), a simple annual interest rate, and a number of months will compute the balance at the end of that time. Assume that no additional
program
program  Write a JSP Program, which displays a web page containing the name of the Courses, Courses being offered currently, number of students enrolled in each course, new courses to be offered, eligibility criteria for taking
program
program  Utopias tax accountants always use programs that compute income taxes even though the tax rate is a solid, never-changing 15%. Define the program calculateTax which determines the tax on the gross pay. Define
program
program  Write a JSP Program, which displays a web page containing two web links one for your profiling and other for the schedule of theory of practical classes of your Batch. When one click on link for getting your profile
java program for
java program for   java program for printing documents,images and cards
program in java
program in java  a program to develop a client, server application to satisfy the requests from multiple clients
program in java
program in java  a program to develop a client, server application to satisfy the requests from multiple clients
a Java program
a Java program    Write a Java program to print even numbers from 2 to 1024? Write a Java program to print ? My Name is Mirza? 100 times? Write a Java program to print Fibonacci Series? Write a Java program to reverse a number
program for factorial
program for factorial  how to set size of buttons on frame
program for factorial
program for factorial  how to set size of buttons on frame
Java Program
Java Program  A Java Program that print the data on the printer but buttons not to be printed
java program
java program  write a program to print 1234 567 89 10
program coding
program coding  how to rearrange the array a[1]. . a[n] even elements and odd elements? please give the example coding program
java program
java program  Develop the program calculatePipeArea. It computes the surface area of a pipe, which is an open cylinder. The program accpets three values: the pipes inner radius, its length, and the thickness of its wall
java program
java program  . Develop the program calculatePipeArea. It computes the surface area of a pipe, which is an open cylinder. The program accpets three values: the pipes inner radius, its length, and the thickness of its wall
java program
java program  . Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any type of numeric values and returns the results
Java program
Java program  Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any type of numeric values and returns the results
program in java
program in java  write a reverse program in java using string buffer.the input and out put as follows. input- hi good mornig out put-ih doog ginrom
ava program
ava program   Explain the process of deleating and renaming a file in a Java program with the help of suitable example.   Please visit the following links: Renaming File Delete File
program coding
program coding  write a c program to rearrange the array a[1]. . .a[n] in such a way that all even elements precede all odd elements (not changing the order inside each of the two groups
program binary
program binary  Hi I want to write a program in pascal that ask a user to input a decimal number and then return its binary equivalent in the minimum number of bits required to repesent the number. In pascal language please
java program
java program   Write a program to find the difference between sum of the squares and the square of the sums of n numbers
java program
java program  how to write an addition program in java without using arithematic operator
Ajax program
Ajax program  any simple program with execution steps using netbeans 6.9
java program
java program  write java program for constructor,overriding,overriding,exception handling
graphics program
graphics program  i want a program that implements merge sort algorithm in graphics
Swing Program
Swing Program  Write a java swing program to calculate the age from given date of birth
JMS Program
JMS Program  Is it possible for anyone to post simple JMS Program and explanation in understandable way
java program
java program  write a java program to display array list and calculate the average of given array
java program
java program  write a java program to display array list and calculate the average of given array
java program
java program  write a program to create text area and display the various mouse handling events
write a program
write a program  write a program add 2 no.s without use arithmetic,unary operaters in java
Java Program
Java Program  java program to insert row in excel sheet after identifying an object
Advertisements
 

 

 

DMCA.com