mirror of https://github.com/01-edu/public.git
Simplify
This commit is contained in:
parent
3b00d4dfe7
commit
5cb1e96818
|
@ -31,10 +31,9 @@ func main() {
|
|||
And its output :
|
||||
|
||||
```console
|
||||
student@ubuntu:~/isnegative/test$ go build
|
||||
student@ubuntu:~/isnegative/test$ ./test
|
||||
$ go run .
|
||||
F
|
||||
F
|
||||
T
|
||||
student@ubuntu:~/isnegative/test$
|
||||
$
|
||||
```
|
||||
|
|
|
@ -9,8 +9,7 @@ A line is a sequence of characters preceding the [end of line](https://en.wikipe
|
|||
### Usage
|
||||
|
||||
```console
|
||||
student@ubuntu:~/printalphabet$ go build
|
||||
student@ubuntu:~/printalphabet$ ./printalphabet
|
||||
$ go run .
|
||||
abcdefghijklmnopqrstuvwxyz
|
||||
student@ubuntu:~/printalphabet$
|
||||
$
|
||||
```
|
||||
|
|
|
@ -31,10 +31,9 @@ func main() {
|
|||
This is the incomplete output :
|
||||
|
||||
```console
|
||||
student@ubuntu:~/printcomb/test$ go build
|
||||
student@ubuntu:~/printcomb/test$ ./test | cat -e
|
||||
$ go run . | cat -e
|
||||
012, 013, 014, 015, 016, 017, 018, 019, 023, ..., 689, 789$
|
||||
student@ubuntu:~/printcomb/test$
|
||||
$
|
||||
```
|
||||
|
||||
`000` or `999` are not valid combinations because the digits are not different.
|
||||
|
|
|
@ -31,8 +31,7 @@ func main() {
|
|||
This is the incomplete output :
|
||||
|
||||
```console
|
||||
student@ubuntu:~/printcomb2/test$ go build
|
||||
student@ubuntu:~/printcomb2/test$ ./test | cat -e
|
||||
$ go run . | cat -e
|
||||
00 01, 00 02, 00 03, ..., 00 98, 00 99, 01 02, 01 03, ..., 97 98, 97 99, 98 99$
|
||||
student@ubuntu:~/printcomb2/test$
|
||||
$
|
||||
```
|
||||
|
|
|
@ -39,10 +39,9 @@ func main() {
|
|||
And its output :
|
||||
|
||||
```console
|
||||
student@ubuntu:~/printcombn/test$ go build
|
||||
student@ubuntu:~/printcombn/test$ ./test
|
||||
$ go run .
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||
012, 013, 014, 015, 016, 017, 018, ... 679, 689, 789
|
||||
012345678, 012345679, ..., 123456789
|
||||
student@ubuntu:~/printcombn/test$
|
||||
$
|
||||
```
|
||||
|
|
|
@ -9,8 +9,7 @@ A line is a sequence of characters preceding the end of line character (`'\n'`).
|
|||
### Usage
|
||||
|
||||
```console
|
||||
student@ubuntu:~/printdigits$ go build
|
||||
student@ubuntu:~/printdigits$ ./printdigits
|
||||
$ go run .
|
||||
0123456789
|
||||
student@ubuntu:~/printdigits$
|
||||
$
|
||||
```
|
||||
|
|
|
@ -36,8 +36,7 @@ func main() {
|
|||
And its output :
|
||||
|
||||
```console
|
||||
student@ubuntu:~/printnbr/test$ go build
|
||||
student@ubuntu:~/printnbr/test$ ./test
|
||||
$ go run .
|
||||
-1230123
|
||||
student@ubuntu:~/printnbr/test$
|
||||
$
|
||||
```
|
||||
|
|
|
@ -11,8 +11,7 @@ Please note that `casting` is not allowed for this exercise!
|
|||
### Usage
|
||||
|
||||
```console
|
||||
student@ubuntu:~/printreversealphabet$ go build
|
||||
student@ubuntu:~/printreversealphabet$ ./printreversealphabet
|
||||
$ go run .
|
||||
zyxwvutsrqponmlkjihgfedcba
|
||||
student@ubuntu:~/printreversealphabet$
|
||||
$
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue