Advertisement
asrulsibaoel

Ulo - uloan

Jan 11th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "fmt"
  5. "math/rand"
  6. "time"
  7. )
  8.  
  9. func random(min, max int) int {
  10. rand.Seed(time.Now().UnixNano())
  11. return rand.Intn(max-min) + min
  12. }
  13.  
  14. func main() {
  15. for {
  16. a := float32(random(1, 9))
  17. b := float32(random(1, 9))
  18. c := float32(random(1, 9))
  19. d := float32(random(1, 9))
  20. e := float32(random(1, 9))
  21. f := float32(random(1, 9))
  22. g := float32(random(1, 9))
  23. h := float32(random(1, 9))
  24. i := float32(random(1, 9))
  25.  
  26. result := float32(a + (13 * b / c) + d + (12 * e) - f - 11 + (g * h / i) - 10)
  27.  
  28. if result == float32(66.00000000000000000) {
  29. fmt.Printf("%.0f + (13 * %.0f / %.0f) + %.0f + (12 * %.0f) - %.0f - 11 + (%.0f * %.0f / %.0f) - 10", a, b, c, d, e, f, g, h, i)
  30. fmt.Println()
  31. return
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement