Browse Source

Adding of a new exercise printalt2.

The goal: printing the alphabet in uppercase alternatively with the last and first letter first and so on. ZAYBXC etc...
content-update
Christopher Fremond 4 years ago committed by xpetit
parent
commit
40246b1ae8
  1. 7
      go/tests/prog/printaltu2_prog/main.go
  2. 9
      go/tests/prog/printaltu2_test/main.go
  3. 18
      subjects/printaltu2/README.md

7
go/tests/prog/printaltu2_prog/main.go

@ -0,0 +1,7 @@
package main
import "fmt"
func main() {
fmt.Println("ZAYBXCWDVEUFTGSHRIQJPKOLNM")
}

9
go/tests/prog/printaltu2_test/main.go

@ -0,0 +1,9 @@
package main
import (
"lib"
)
func main() {
lib.ChallengeMain("printaltu2")
}

18
subjects/printaltu2/README.md

@ -0,0 +1,18 @@
## printaltu2
### Instructions
Write a program that prints the Latin alphabet in uppercase alternatively with the last and first letters, then with the second to last and second letters, and so on until all the alphabet letters are displayed 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]]/printaltu2$ go build
student@ubuntu:~/[[ROOT]]/printaltu2$ ./printaltu2
ZAYBXCWDVEUFTGSHRIQJPKOLNM
student@ubuntu:~/[[ROOT]]/printaltu2$
```
Loading…
Cancel
Save