38 lines
539 B
Go
38 lines
539 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"strconv"
|
||
|
)
|
||
|
|
||
|
var numsToSum []int
|
||
|
var choice2 int
|
||
|
|
||
|
// TODO: Get function done
|
||
|
func getAverage() {
|
||
|
|
||
|
}
|
||
|
|
||
|
func statusMSG() {
|
||
|
fmt.Printf("Current numbers: %v\n", numsToSum)
|
||
|
fmt.Println("[1] Add number")
|
||
|
fmt.Println("[2] Calculate average")
|
||
|
}
|
||
|
|
||
|
func fun2() {
|
||
|
clear()
|
||
|
statusMSG()
|
||
|
strchoice2 := scanLine()
|
||
|
choice2, err = strconv.Atoi(strchoice2)
|
||
|
catchErr(err)
|
||
|
|
||
|
looper:
|
||
|
for {
|
||
|
switch choice2 {
|
||
|
// TODO: Add options to add numbers to array and then to calcluate them later
|
||
|
case 1:
|
||
|
break looper
|
||
|
}
|
||
|
}
|
||
|
}
|