Advertisement
nadiahristova

Prob1_RectangleArea

Jan 24th, 2015
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Prob1_RectangleArea {
  4.     public static void main(String[] args) {
  5.         Scanner input = new Scanner(System.in);
  6.         System.out.print("Please enter the sides of the rectangle[cm]: ");
  7.         int a = input.nextInt();
  8.         int b = input.nextInt();
  9.         int area = a * b;
  10.         System.out.println("The area of the rectangle is "+ area + " cm\u00B2.");  
  11.     }
  12.  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement