Skip to content

Latest commit

 

History

History
executable file
·
99 lines (64 loc) · 1.79 KB

cars-doc.md

File metadata and controls

executable file
·
99 lines (64 loc) · 1.79 KB

cars

import "cars"

Index

func CalculateCost(carsCount int) uint

CalculateCost works out the cost of producing the given number of cars

Example

{
	fmt.Println(CalculateCost(37))

}

Output

355000

func CalculateWorkingCarsPerHour(productionRate int, successRate float64) float64

CalculateWorkingCarsPerHour calculates how many working cars are produced by the assembly line every hour

Example

{
	fmt.Println(CalculateWorkingCarsPerHour(1547, 90))

}

Output

1392.3

func CalculateWorkingCarsPerMinute(productionRate int, successRate float64) int

CalculateWorkingCarsPerMinute calculates how many working cars are produced by the assembly line every minute

Example

{
	fmt.Println(CalculateWorkingCarsPerMinute(1105, 90))

}

Output

16

Generated by gomarkdoc