|
|
@ -1,4 +1,4 @@ |
|
|
|
# shoppingsummarycounter |
|
|
|
## shoppingsummarycounter |
|
|
|
|
|
|
|
|
|
|
|
### Instructions |
|
|
|
### Instructions |
|
|
|
|
|
|
|
|
|
|
@ -21,12 +21,15 @@ Here is a possible program to test your function: |
|
|
|
```go |
|
|
|
```go |
|
|
|
package main |
|
|
|
package main |
|
|
|
|
|
|
|
|
|
|
|
import "fmt" |
|
|
|
import ( |
|
|
|
|
|
|
|
"fmt" |
|
|
|
|
|
|
|
"piscine" |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
func main() { |
|
|
|
func main() { |
|
|
|
summary := "Burger Water Carrot Coffee Water Water Chips Carrot Carrot Burger Carrot Water" |
|
|
|
summary := "Burger Water Carrot Coffee Water Water Chips Carrot Carrot Burger Carrot Water" |
|
|
|
for index,element := range ShoppingSummaryCounter(summary){ |
|
|
|
for index,element := range piscine.ShoppingSummaryCounter(summary){ |
|
|
|
fmt.Println(index,"=>",element) |
|
|
|
fmt.Println(index,"=>",element) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
``` |
|
|
|