SHARE
TWEET

Untitled

a guest Aug 17th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // You can edit this code!
  2. // Click here and start typing.
  3. package main
  4.  
  5. import (
  6.     "fmt"
  7.     "math/rand"
  8. )
  9. func randomInt(min, max int) int {
  10.     return min + rand.Intn(max-min)
  11. }
  12.  
  13.  
  14. func languages(name string, role string){
  15.   languages := [8]string{"python", "javascript", "go", "c++", "java", "php", "swift", "scala"}
  16.   number:=randomInt(0, 8)
  17.   language:=languages[number]
  18.   fmt.Println(number)
  19.   for i := 0; i < 8; i++ {
  20.  
  21.     if language == languages[i] {
  22.       fmt.Println("A ", name, " le gusta ser un ", role, " pero no le gusta programar en ", languages[i])
  23.     }else{
  24.        fmt.Println(" ", name, " sera un buen ", role, " en ", languages[i])
  25.     }
  26.  
  27.    
  28.   }
  29. }
  30.  
  31. func main() {
  32.   languages("Henry", "FullStack")
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top