Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- // Nah sekarang kalian coba outputkan nilai terakhir dari array/slice dibawah
- // manfaatkan syntax len() ya.
- // Output:
- // Panjang array adalah 69
- // Nilai terakhir dari array adalah 51
- func main() {
- array := [69]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, 14, 15, 17, 19, 20, 21, 24, 26, 29,
- 71, 84, 85, 87, 19, 20, 61, 24, 56, 52,
- 71, 84, 85, 87, 19, 20, 61, 24, 56, 53,
- 71, 84, 85, 87, 19, 20, 61, 24, 56, 59,
- 71, 84, 85, 87, 19, 20, 61, 24, 56, 51,
- 7, 15, 85, 19, 20, 61, 24, 56, 51,
- }
- // TODO: answer here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement