Advertisement
Spocoman

07. House Painting

Sep 15th, 2024
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.30 KB | None | 0 0
  1. package main
  2. import "fmt"
  3.  
  4. func main() {
  5.     var x, y, h float64
  6.     fmt.Scanln(&x)
  7.     fmt.Scanln(&y)
  8.     fmt.Scanln(&h)
  9.  
  10.     var green = x * y * 2 - (1.5 * 1.5 * 2) + x * x * 2 - 1.2 * 2
  11.     var red = 2 * (x * y) + 2 * (x * h / 2)
  12.  
  13.     fmt.Printf("%.2f\n%.2f\n", green / 3.4, red / 4.3)
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement