Advertisement
Guest User

Problem 1. Rectangle Area

a guest
May 15th, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3.  
  4. public class RectangleArea {
  5.  
  6. public static void main(String[] args) {
  7. Scanner input = new Scanner(System.in);
  8. System.out.print("Enter rectangle side a: ");
  9. int a = input.nextInt();
  10. System.out.print("Enter rectangle side b: ");
  11. int b = input.nextInt();
  12. //Print and area
  13. System.out.print("Area is: ");
  14. System.out.println(a*b);
  15.  
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement