mirror of
https://github.com/bootdotdev/fcc-learn-golang-assets.git
synced 2025-12-17 18:51:17 +00:00
first
This commit is contained in:
26
course/7-loops/exercises/2-omit_condition/code.go
Normal file
26
course/7-loops/exercises/2-omit_condition/code.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func maxMessages(thresh float64) int {
|
||||
// ?
|
||||
}
|
||||
|
||||
// don't edit below this line
|
||||
|
||||
func test(thresh float64) {
|
||||
fmt.Printf("Threshold: %.2f\n", thresh)
|
||||
max := maxMessages(thresh)
|
||||
fmt.Printf("Maximum messages that can be sent: = %v\n", max)
|
||||
fmt.Println("===============================================================")
|
||||
}
|
||||
|
||||
func main() {
|
||||
test(10.00)
|
||||
test(20.00)
|
||||
test(30.00)
|
||||
test(40.00)
|
||||
test(50.00)
|
||||
}
|
||||
Reference in New Issue
Block a user