|
|
@ -1,10 +1,17 @@ |
|
|
|
## Point |
|
|
|
## point |
|
|
|
|
|
|
|
|
|
|
|
### Instructions |
|
|
|
### Instructions |
|
|
|
|
|
|
|
|
|
|
|
Create a `.go` file and copy the code below into our file |
|
|
|
Créer un fichier `.go`. |
|
|
|
|
|
|
|
|
|
|
|
- The main task is to return a working program. |
|
|
|
- Le code ci-dessous doit être copié dans ce fichier. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Les changements nécéssaires doivent être appliquer et the code below into that file |
|
|
|
|
|
|
|
and do the necessary changes so that the program works. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Le programme doit être rendu dans un dossier nommé `boolean`. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Code à copier |
|
|
|
|
|
|
|
|
|
|
|
```go |
|
|
|
```go |
|
|
|
func setPoint(ptr *point) { |
|
|
|
func setPoint(ptr *point) { |
|
|
@ -17,12 +24,11 @@ func main() { |
|
|
|
|
|
|
|
|
|
|
|
setPoint(points) |
|
|
|
setPoint(points) |
|
|
|
|
|
|
|
|
|
|
|
fmt.Printf("x = %d, y = %d",points.x, points.y) |
|
|
|
fmt.Printf("x = %d, y = %d\n",points.x, points.y) |
|
|
|
fmt.Println() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
### Expected output |
|
|
|
### Usage |
|
|
|
|
|
|
|
|
|
|
|
```console |
|
|
|
```console |
|
|
|
student@ubuntu:~/piscine/test$ go build |
|
|
|
student@ubuntu:~/piscine/test$ go build |
|
|
|