Advertisement
Spocoman

01. Trapeziod Area

Sep 15th, 2024
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.21 KB | None | 0 0
  1. package main
  2. import "fmt"
  3.  
  4. func main() {
  5.     var b1, b2, h float64
  6.     fmt.Scanln(&b1)
  7.     fmt.Scanln(&b2)
  8.     fmt.Scanln(&h)
  9.  
  10.     var result = (b1 + b2) * h / 2
  11.    
  12.     fmt.Printf("%.2f", result)
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement