mirror of
https://github.com/bootdotdev/fcc-learn-golang-assets.git
synced 2025-12-10 07:11:19 +00:00
23 lines
458 B
Go
23 lines
458 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
messagesFromDoris := []string{
|
|
"You doing anything later??",
|
|
"Did you get my last message?",
|
|
"Don't leave me hanging...",
|
|
"Please respond I'm lonely!",
|
|
}
|
|
numMessages := float64(len(messagesFromDoris))
|
|
costPerMessage := .02
|
|
|
|
// don't touch above this line
|
|
|
|
totalCost := costPerMessage * numMessages
|
|
|
|
// don't touch below this line
|
|
|
|
fmt.Printf("Doris spent %.2f on text messages today\n", totalCost)
|
|
}
|