Advertisement
Spocoman

Change Tiles

Oct 4th, 2024
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.51 KB | None | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     var areaSide int
  7.     fmt.Scanln(&areaSide)
  8.    
  9.     var tileWidth, tileLength float64
  10.     fmt.Scanln(&tileWidth)
  11.     fmt.Scanln(&tileLength)
  12.    
  13.     var benchWidth, benchLength float64
  14.     fmt.Scanln(&benchWidth)
  15.     fmt.Scanln(&benchLength)
  16.        
  17.     area := float64(areaSide * areaSide) - benchLength * benchWidth
  18.     tileArea := tileWidth * tileLength
  19.     tiles := area / tileArea
  20.     time := tiles * 0.2
  21.  
  22.     fmt.Printf("%f\n%f\n", tiles, time)
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement