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 :
|
And its output :
|
||||||
|
|
||||||
```console
|
```console
|
||||||
student@ubuntu:~/isnegative/test$ go build
|
$ go run .
|
||||||
student@ubuntu:~/isnegative/test$ ./test
|
|
||||||
F
|
F
|
||||||
F
|
F
|
||||||
T
|
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
|
### Usage
|
||||||
|
|
||||||
```console
|
```console
|
||||||
student@ubuntu:~/printalphabet$ go build
|
$ go run .
|
||||||
student@ubuntu:~/printalphabet$ ./printalphabet
|
|
||||||
abcdefghijklmnopqrstuvwxyz
|
abcdefghijklmnopqrstuvwxyz
|
||||||
student@ubuntu:~/printalphabet$
|
$
|
||||||
```
|
```
|
||||||
|
|
|
@ -31,10 +31,9 @@ func main() {
|
||||||
This is the incomplete output :
|
This is the incomplete output :
|
||||||
|
|
||||||
```console
|
```console
|
||||||
student@ubuntu:~/printcomb/test$ go build
|
$ go run . | cat -e
|
||||||
student@ubuntu:~/printcomb/test$ ./test | cat -e
|
|
||||||
012, 013, 014, 015, 016, 017, 018, 019, 023, ..., 689, 789$
|
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.
|
`000` or `999` are not valid combinations because the digits are not different.
|
||||||
|
|
|
@ -31,8 +31,7 @@ func main() {
|
||||||
This is the incomplete output :
|
This is the incomplete output :
|
||||||
|
|
||||||
```console
|
```console
|
||||||
student@ubuntu:~/printcomb2/test$ go build
|
$ go run . | cat -e
|
||||||
student@ubuntu:~/printcomb2/test$ ./test | cat -e
|
|
||||||
00 01, 00 02, 00 03, ..., 00 98, 00 99, 01 02, 01 03, ..., 97 98, 97 99, 98 99$
|
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 :
|
And its output :
|
||||||
|
|
||||||
```console
|
```console
|
||||||
student@ubuntu:~/printcombn/test$ go build
|
$ go run .
|
||||||
student@ubuntu:~/printcombn/test$ ./test
|
|
||||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||||
012, 013, 014, 015, 016, 017, 018, ... 679, 689, 789
|
012, 013, 014, 015, 016, 017, 018, ... 679, 689, 789
|
||||||
012345678, 012345679, ..., 123456789
|
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
|
### Usage
|
||||||
|
|
||||||
```console
|
```console
|
||||||
student@ubuntu:~/printdigits$ go build
|
$ go run .
|
||||||
student@ubuntu:~/printdigits$ ./printdigits
|
|
||||||
0123456789
|
0123456789
|
||||||
student@ubuntu:~/printdigits$
|
$
|
||||||
```
|
```
|
||||||
|
|
|
@ -36,8 +36,7 @@ func main() {
|
||||||
And its output :
|
And its output :
|
||||||
|
|
||||||
```console
|
```console
|
||||||
student@ubuntu:~/printnbr/test$ go build
|
$ go run .
|
||||||
student@ubuntu:~/printnbr/test$ ./test
|
|
||||||
-1230123
|
-1230123
|
||||||
student@ubuntu:~/printnbr/test$
|
$
|
||||||
```
|
```
|
||||||
|
|
|
@ -11,8 +11,7 @@ Please note that `casting` is not allowed for this exercise!
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
```console
|
```console
|
||||||
student@ubuntu:~/printreversealphabet$ go build
|
$ go run .
|
||||||
student@ubuntu:~/printreversealphabet$ ./printreversealphabet
|
|
||||||
zyxwvutsrqponmlkjihgfedcba
|
zyxwvutsrqponmlkjihgfedcba
|
||||||
student@ubuntu:~/printreversealphabet$
|
$
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue