Better grammar 'three best friends'
This commit is contained in:
committed by
İnanç Gümüş
parent
c6eb8c38df
commit
c1a94a4bcb
@ -13,7 +13,7 @@ package main
|
|||||||
//
|
//
|
||||||
// 1. Declare and print the following arrays with their types:
|
// 1. Declare and print the following arrays with their types:
|
||||||
//
|
//
|
||||||
// 1. The names of your best three friends (names array)
|
// 1. The names of your three best friends (names array)
|
||||||
//
|
//
|
||||||
// 2. The distances to five different locations (distances array)
|
// 2. The distances to five different locations (distances array)
|
||||||
//
|
//
|
||||||
|
@ -12,7 +12,7 @@ import "fmt"
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var (
|
var (
|
||||||
names [3]string // The names of your best three friends
|
names [3]string // The names of your three best friends
|
||||||
distances [5]int // The distances to five different locations
|
distances [5]int // The distances to five different locations
|
||||||
data [5]byte // A data buffer with five bytes of capacity
|
data [5]byte // A data buffer with five bytes of capacity
|
||||||
ratios [1]float64 // Currency exchange ratios only for a single currency
|
ratios [1]float64 // Currency exchange ratios only for a single currency
|
||||||
|
@ -15,7 +15,7 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var (
|
var (
|
||||||
names [3]string // The names of your best three friends
|
names [3]string // The names of your three best friends
|
||||||
distances [5]int // The distances to five different locations
|
distances [5]int // The distances to five different locations
|
||||||
data [5]byte // A data buffer with five bytes of capacity
|
data [5]byte // A data buffer with five bytes of capacity
|
||||||
ratios [1]float64 // Currency exchange ratios only for a single currency
|
ratios [1]float64 // Currency exchange ratios only for a single currency
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// The names of your best three friends
|
// The names of your three best friends
|
||||||
names := [3]string{
|
names := [3]string{
|
||||||
"Einstein",
|
"Einstein",
|
||||||
"Tesla",
|
"Tesla",
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// The names of your best three friends
|
// The names of your three best friends
|
||||||
names := [...]string{
|
names := [...]string{
|
||||||
"Einstein",
|
"Einstein",
|
||||||
"Tesla",
|
"Tesla",
|
||||||
|
@ -16,7 +16,7 @@ import "fmt"
|
|||||||
// 1. Assign the following data using slice literals to the slices that
|
// 1. Assign the following data using slice literals to the slices that
|
||||||
// you've declared in the first exercise.
|
// you've declared in the first exercise.
|
||||||
//
|
//
|
||||||
// 1. The names of your best three friends (to the names slice)
|
// 1. The names of your three best friends (to the names slice)
|
||||||
//
|
//
|
||||||
// 2. The distances to five different locations (to the distances slice)
|
// 2. The distances to five different locations (to the distances slice)
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user