Section11-5

This commit is contained in:
2023-11-17 13:28:33 +01:00
parent 12c600ef09
commit a2dc92f941
3 changed files with 97 additions and 0 deletions

View File

@@ -15,3 +15,18 @@ Coding Exercise #3
7. Print out the nums slice
*/
package main
import "fmt"
func main() {
nums := []float64{1.1, 2.1, 3.1}
nums = append(nums, 10.1)
fmt.Println(nums)
nums = append(nums, 4.1, 5.5, 6.6)
fmt.Println(nums)
n := []float64{8.1, 9.3}
nums = append(nums, n...)
fmt.Println(nums)
}