Browse Source

docs: Add description of pingpong subject

DEV-3241-DEV-3242-corewar
estlop 2 years ago committed by Dav Hojt
parent
commit
2155f4b6fc
  1. 22
      subjects/pingpong/README.md

22
subjects/pingpong/README.md

@ -0,0 +1,22 @@
### Instructions
Write a program that checks if a number up to a given number is an odd or even number.
The number will be between `0` and `100`.
- If the number is `odd` then it prints `ping` as in the example below.
- If the number is `even` then it prints `pong`.
- If the number of arguments is invalid then do nothing.
### Usage
```console
$ go run . 6 | cat -e
0 ping$
1 pong$
2 ping$
3 pong$
4 ping$
5 pong$
$ go run . | cat -e
$
```
Loading…
Cancel
Save