/* Lab : Lab2 Day : Tuesday [ 05 Aug 08 ] Problem Number: 03 Problem Title : Surface area and volume of a cylender Theory : Much of the theory is explained in the problem Let us follow the instructions given in the problem */ class sol_lab2_prob03{ public static void main(String args[]) { // Declare two variable redius and height of type double double radius, height; // done // Assign then some positive value radius = 10.0; height = 12.5; // done // Calculate and print surface area // [ no no u need not to calculate the answer, write expression computer will calculate by it self ] System.out.print("\nSurface area is :"); System.out.print( ( 2 * 3.142 * radius * radius ) + ( 2 * 3.14 * radius * height ) ); // This is the expressioan // done printing surface area // Calculate and print volume of cylinder System.out.print("\nVolume is :"); System.out.println( 3.142 * radius * radius * height ); // This is the expressioan // done printing volume } }