VariableAmountOfArgs
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package sub
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"os"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func Kek(fileName string) []int {
|
||||
var seg []int
|
||||
counter := 0
|
||||
file,_ := os.Open(fileName)
|
||||
scanner := bufio.NewScanner(file)
|
||||
for scanner.Scan() {
|
||||
mid,_ := strconv.ParseInt(scanner.Text(),0,0)
|
||||
seg = append(seg,int(mid))
|
||||
counter++
|
||||
}
|
||||
return seg
|
||||
}
|
||||
Reference in New Issue
Block a user