Advertisement
Guest User

01. RectangleArea

a guest
Aug 27th, 2015
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class _01_RectangleArea {
  4.     public static void main(String[] args) {
  5.         Scanner scan = new Scanner(System.in);
  6.  
  7.         int widthOfRectangle  = scan.nextInt();
  8.         int heightOfRectangle = scan.nextInt();
  9.         int areaOfRectangle = widthOfRectangle * heightOfRectangle;
  10.  
  11.         System.out.printf("The area of the rectangle is %d.", areaOfRectangle);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement