I've just started my study IT and I thought it would be fun to make a little program that would show you what day it is tomorrow. Sadly I'm stuck. Currently it's working when you write the correct number from the array, but I would like it to work with a string. So when you write 'Maandag' (monday in Dutch), the program will answer Dinsdag (Tuesday in Dutch)
This is my code so far:
package main
import (
"fmt"
)
func main() {
var counter int
var dag [7]string
dag[0] = "Zondag"
dag[1] = "Maandag"
dag[2] = "Dinsdag"
dag[3] = "Woensdag"
dag[4] = "Donderdag"
dag[5] = "Vrijdag"
dag[6] = "Zaterdag"
fmt.Println("Welke dag is het?")
fmt.Scan(&counter)
if counter == 6 {
counter = 0
fmt.Println(dag[counter])
}
if counter != 6 {
counter++
fmt.Println(dag[counter])
}
}