Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Project {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- double b1 = Double.parseDouble(sc.nextLine());
- double b2 = Double.parseDouble(sc.nextLine());
- double h = Double.parseDouble(sc.nextLine());
- double result = (b1 + b2) + h / 2;
- System.out.printf("pp result is %.2f", result );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement