Browse Source

docs(checknumber): added subject

- it was removed by mistake before
pull/1635/head
jrosendo 2 years ago committed by José Rosendo
parent
commit
0cb639701a
  1. 37
      subjects/checknumber/README.md

37
subjects/checknumber/README.md

@ -0,0 +1,37 @@
## checknumber
### Instructions
Write a function that takes a `string` as an argument and returns `true` if the string contains any number, otherwise return `false`.
### Expected function
```go
func CheckNumber(arg string) bool {
}
```
### Usage
Here is a possible program to test your function:
```go
package main
import (
"fmt"
"piscine"
)
func main() {
fmt.Println(piscine.CheckNumber("Hello"))
fmt.Println(piscine.CheckNumber("Hello1"))
}
```
And its output:
```console
$ go run .
false
true
$
```
Loading…
Cancel
Save