From abe55b8f37752382b088d07f454b32f56e6a0449 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 16 Feb 2022 17:51:45 +0000 Subject: [PATCH] fixed issue with negative results Signed-off-by: Michael --- train/{ => go}/go.mod | 0 train/{ => go}/main.go | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename train/{ => go}/go.mod (100%) rename train/{ => go}/main.go (90%) diff --git a/train/go.mod b/train/go/go.mod similarity index 100% rename from train/go.mod rename to train/go/go.mod diff --git a/train/main.go b/train/go/main.go similarity index 90% rename from train/main.go rename to train/go/main.go index 11d34b3..042b496 100755 --- a/train/main.go +++ b/train/go/main.go @@ -17,8 +17,8 @@ func main() { fmt.Println("Creative Computing Morristown, New Jersey") fmt.Printf("Time - Speed Distance Exercise:") var car int = rand.Intn(65-40) + 40 - var distance int = rand.Intn(20-5) + 20 - var train int = rand.Intn(39-20) + 39 + var distance int = rand.Intn(20-5) + 5 + var train int = rand.Intn(39-20) + 20 fmt.Printf(" A Car traveling %d MPH can make a certain trip in %d hours less than a Train traveling at %d MPH.\n", car, distance, train) for { scanner := bufio.NewScanner(os.Stdin)