🎨 Make some nice Log

This commit is contained in:
Alphyron 2019-12-02 19:28:59 +01:00
parent 9c2d4c65fa
commit 4f2c6c4956

View File

@ -15,6 +15,7 @@ func main() {
defer file.Close()
completeFuel := 0
recursiveFuel := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
@ -25,14 +26,16 @@ func main() {
log.Fatal(err)
}
completeFuel += CalcFuelRecusive(convert)
completeFuel += CalcRequiredFuel(convert)
recursiveFuel += CalcFuelRecusive(convert)
}
if err := scanner.Err(); err != nil {
log.Fatal(err)
}
log.Println(completeFuel)
log.Println("Part1: " + strconv.Itoa(completeFuel))
log.Println("Part2: " + strconv.Itoa(recursiveFuel))
}
func CalcFuelRecusive(mass float64) int {