Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Project {
  4. public static void main(String[] args) {
  5. Scanner sc = new Scanner(System.in);
  6. double b1 = Double.parseDouble(sc.nextLine());
  7. double b2 = Double.parseDouble(sc.nextLine());
  8. double h = Double.parseDouble(sc.nextLine());
  9.  
  10. double result = (b1 + b2) + h / 2;
  11. System.out.printf("pp result is %.2f", result );
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement