mirror of https://github.com/01-edu/public.git
Adding of a new exercise printalphabetalt2.
The goal: printing the alphabet in reverse order alternatively in uppercase and in lowercase from Z to a, and then from A to z.
This commit is contained in:
parent
82b019d320
commit
7c7732b418
|
@ -0,0 +1,8 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("ZyXwVuTsRqPoNmLkJiHgFeDcBa")
|
||||
fmt.Println("AbCdEfGhIjKlMnOpQrStUvWxYz")
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"lib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
lib.ChallengeMain("printreversealphabetalt2")
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
## printreversealphabetalt2
|
||||
|
||||
### Instructions
|
||||
|
||||
Write a program that:
|
||||
|
||||
- first prints the Latin alphabet alternatively in uppercase and lowercase in reverse order (from `'Z'` to `'a'`) on a single line.
|
||||
- second prints the Latin alphabet alternatively in uppercase and lowercase in order (from `'A'` to `'z'`) on a single line.
|
||||
|
||||
A line is a sequence of characters preceding the [end of line](https://en.wikipedia.org/wiki/Newline) character (`'\n'`).
|
||||
|
||||
Please note that `casting` is not allowed for this exercise!
|
||||
|
||||
### Usage
|
||||
|
||||
```console
|
||||
student@ubuntu:~/[[ROOT]]/printreversealphabetalt2$ go build
|
||||
student@ubuntu:~/[[ROOT]]/printreversealphabetalt2$ ./printreversealphabetalt2
|
||||
ZyXwVuTsRqPoNmLkJiHgFeDcBa
|
||||
AbCdEfGhIjKlMnOpQrStUvWxYz
|
||||
student@ubuntu:~/[[ROOT]]/printreversealphabetalt2$
|
||||
```
|
Loading…
Reference in New Issue