fixed issue with negative results
Signed-off-by: Michael <michael.lindman@gmail.com>
This commit is contained in:
parent
a35c009f91
commit
abe55b8f37
@ -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)
|
Loading…
Reference in New Issue
Block a user