Browse Source

Merge pull request #194 from 01-edu/fixActivebits

fix activebits readme from hackaton
content-update
augusto-mantilla 5 years ago committed by GitHub
parent
commit
50c7363c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      subjects/activebits.en.md
  2. 16
      subjects/activebits.fr.md

16
subjects/activebits.en.md

@ -2,9 +2,7 @@
### Instructions
Write a function, ActiveBitsthat, that returns the number of active bits (bits with the value 1) in the binary representation of an integer number.
The function must have the next signature.
Write a function, `ActiveBits`, that returns the number of active bits (bits with the value 1) in the binary representation of an integer number.
### Expected function
@ -23,11 +21,11 @@ package main
import (
"fmt"
student ".."
piscine ".."
)
func main() {
nbits := student.ActiveBits(7)
nbits := piscine.ActiveBits(7)
fmt.Println(nbits)
}
```
@ -35,8 +33,8 @@ func main() {
And its output :
```console
student@ubuntu:~/student/activebits$ go build
student@ubuntu:~/student/activebits$ ./activebits
10
student@ubuntu:~/student/activebits$
student@ubuntu:~/piscine/test$ go build
student@ubuntu:~/piscine/test$ ./test
3
student@ubuntu:~/piscine/test$
```

16
subjects/activebits.fr.md

@ -2,9 +2,7 @@
### Instructions
Write a function, ActiveBitsthat, that returns the number of active bits (bits with the value 1) in the binary representation of an integer number.
The function must have the next signature.
Write a function, `ActiveBits`, that returns the number of active bits (bits with the value 1) in the binary representation of an integer number.
### Expected function
@ -23,11 +21,11 @@ package main
import (
"fmt"
student ".."
piscine ".."
)
func main() {
nbits := student.ActiveBits(7)
nbits := piscine.ActiveBits(7)
fmt.Println(nbits)
}
```
@ -35,8 +33,8 @@ func main() {
And its output :
```console
student@ubuntu:~/student/activebits$ go build
student@ubuntu:~/student/activebits$ ./activebits
10
student@ubuntu:~/student/activebits$
student@ubuntu:~/piscine/test$ go build
student@ubuntu:~/piscine/test$ ./test
3
student@ubuntu:~/piscine/test$
```

Loading…
Cancel
Save