Browse Source

Adding of a new exercise printalt.

The goal: printing the alphabet alternatively with the first and last letter first and so on. azbycx etc...
pull/686/head
Christopher Fremond 4 years ago committed by xpetit
parent
commit
1de723ef7f
  1. 7
      go/tests/prog/printalt_prog/main.go
  2. 9
      go/tests/prog/printalt_test/main.go
  3. 18
      subjects/printalt/README.md

7
go/tests/prog/printalt_prog/main.go

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

9
go/tests/prog/printalt_test/main.go

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

18
subjects/printalt/README.md

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