Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class cd {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- System.out.print("Въведи a: ");
- double a = scan.nextDouble();
- System.out.print("Въведи b: ");
- double b = scan.nextDouble();
- double perimeter = 2 * (a + b);
- double area = a * b;
- System.out.println("Периметър: " + perimeter);
- System.out.print("Лице: " + area);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement