Advertisement
shorti

Rectangle Area (Java)

May 15th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class RectangleArea01 {
  4.     public static void main(String[] args){
  5.         double a;
  6.         double b;
  7.         Scanner input = new Scanner(System.in);
  8.         System.out.print("a = ");
  9.         a = input.nextInt();
  10.         System.out.print("b = ");
  11.         b = input.nextInt();
  12.         double sum = a * b;
  13.         System.out.println("Sum = " + sum);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement