Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Трапец {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- System.out.print("a = ");
- double a = scan.nextInt();
- System.out.print("b = ");
- double b = scan.nextInt();
- System.out.print("h = ");
- double h = scan.nextInt();
- double S = ((a + b)*h) / 2;
- System.out.print("S = " + S + "square cm");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement