rectangle - S System.out.println("Enter...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.*; import java.lang.*; import java.io.*; import java.text.*; import java.math.*; import java.text.DecimalFormat; i public class rectangle { static Scanner console = new Scanner(System.in); public static void main(String[] args) p { int lenght; int width; int perimeter; int area; System.out.println("Enter lenght"); lenght = console.nextInt(); System.out.println();
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: S System.out.println("Enter width"); width = console.nextInt(); System.out.println(); S System.out.println(); perimeter= 2 * (lenght+width); area=lenght * width; a System.out.println(" Perimeter of the Rectangle is " + perimeter); System.out.println(" Area of the Rectangle is " + area); S System.out.println("Have a nice day"); } }...
View Full Document

This note was uploaded on 06/17/2011 for the course COMP 2301 taught by Professor Staff during the Spring '10 term at Kennesaw.

Ask a homework question - tutors are online