„2017/06/15 - 16:14 - 131. CV, Vortrag Rechenschaftsbericht 2016 vorbereitet #priv #fb“

 

 

 
 
 
18. August 2017

Maya calendar and go

 

 

package main

import ("fmt"
"bufio"
"os"
"time"
//"strings"
)

func Recursive(number int) int {

if number >=2020 {
fmt.Println(number);
return number
} else {
fmt.Println(number);
}
return Recursive(number+52)

}
func readword(ch chan string) {
fmt.Println("Type a word, then hit Enter.")
var word string
fmt.Scanf("%s", &word)
ch <- word
}


func main() {
months := []string{"Pop", "Uo", "Zip", "Zotz","Zec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"}
var cMonth, mMonth int
p := fmt.Println

reader := bufio.NewReader(os.Stdin)
fmt.Print("Enter text: ")
text, _ := reader.ReadString('\n')
p(text)
// date input
//a:=strings.Split(text,".")
// p(a[1])

now := time.Now()
p(now)
b:=now.YearDay()
p("YearDay: ", b)
cMonth =b%20
mMonth = ((b-cMonth)/20)-1

p(cMonth-1," ",months[mMonth])

// 52 years list
// answer := Recursive(-3114)
// fmt.Printf("Recursive: %d\n", answer)
}

 


Tags/Schlagworte dieses Artikels: Review, Aktionsrückschau, google, go, programming language

 

Artikelgröße:
159 Wörter, 924 Zeichen exklusive Leerzeichen, 1082 Zeichen insg.

 

Permanenter Link zu diesem Artikel:
http://phelan.csv.net/index.php?id=1503010049-004729


 

Zurück zur Startseite