From 4d923013b019acdcccb6e36cd59a5c16325ca6ca Mon Sep 17 00:00:00 2001 From: Augusto Date: Tue, 1 Oct 2019 21:52:37 +0100 Subject: [PATCH] nrune program for the exams --- subjects/nruneprog.en.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 subjects/nruneprog.en.md diff --git a/subjects/nruneprog.en.md b/subjects/nruneprog.en.md new file mode 100644 index 000000000..e6aacebac --- /dev/null +++ b/subjects/nruneprog.en.md @@ -0,0 +1,22 @@ +## nruneprog + +### Instructions + +Write a function that returns the nth `rune` of a `string`. + +### Expected output : + +```console +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 2 +e +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 4 +l +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 5 +o +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" f +"f" is not an integer value +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 9 +Invalid position: "9" in "hello" +student@ubuntu:~/piscine-go/nruneprog$ +``` \ No newline at end of file