Students can visit http://java.sun.com/javase/6/docs/api to read up on how to use the various java classes (e.g. those in Q1-3 of Lab0).
The main question for this training:
Write a program that reads three positive integers representing the length, width and height of a cube, and computes the volume of the cube.
Sample output:
C:\javac Cube.java
C:\java Cube
Enter length: 12
Enter width : 3
Enter height: 10
Volume = 360
No comments:
Post a Comment