58 lines
959 B
Go
58 lines
959 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
//"log"
|
|
)
|
|
|
|
var notas []int
|
|
|
|
func main() {
|
|
fmt.Print("\033[H\033[2J")
|
|
fmt.Printf("Welcome to the vector playground\n\n")
|
|
//fmt.Printf("Welcome to this weird exercise\n\n")
|
|
fmt.Printf("[1] Add to vector\n")
|
|
fmt.Printf("[2] View results\n")
|
|
|
|
fmt.Printf("\nPlease, select your choice: ")
|
|
|
|
var choice int
|
|
|
|
ask:
|
|
for {
|
|
fmt.Scan(&choice)
|
|
|
|
switch choice {
|
|
case 1:
|
|
addVec()
|
|
break ask
|
|
case 2:
|
|
showResults()
|
|
break ask
|
|
default:
|
|
fmt.Print("\033[H\033[2J")
|
|
fmt.Printf("[-] ERROR: invalid input\n\n")
|
|
fmt.Printf("[1] Add to vector\n")
|
|
fmt.Printf("[2] View results\n")
|
|
fmt.Printf("\nPlease, select your choice: ")
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
func msg() {
|
|
fmt.Printf("[1] Add to vector\n")
|
|
fmt.Printf("[2] View results\n")
|
|
|
|
fmt.Printf("\nPlease, select your choice: ")
|
|
}
|
|
|
|
func addVec() {
|
|
fmt.Println("This is the vector add function!")
|
|
}
|
|
|
|
func showResults() {
|
|
fmt.Println("This is the show results function!")
|
|
|
|
}
|