You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
686 B

5 years ago
## point
### Instructions
5 years ago
Créer un fichier `.go`.
5 years ago
- Le code ci-dessous doit être copié dans ce fichier.
5 years ago
5 years ago
- 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.
5 years ago
5 years ago
- Le programme doit être rendu dans un dossier nommé `boolean`.
5 years ago
### Code à copier
```go
func setPoint(ptr *point) {
ptr.x = 42
ptr.y = 21
}
func main() {
points := &point{}
setPoint(points)
5 years ago
fmt.Printf("x = %d, y = %d\n",points.x, points.y)
}
```
5 years ago
### Usage
```console
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
x = 42, y = 21
student@ubuntu:~/piscine-go/test$
```