Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package methods;
- import java.util.Scanner;
- public class P06CalculateRectangleArea {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double width = Double.parseDouble(scanner.nextLine());
- double length = Double.parseDouble(scanner.nextLine());
- double area = calculateRectangleArea(width, length);
- System.out.printf("%.0f", area);
- }
- public static double calculateRectangleArea(double width, double length) {
- return width * length;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement