From cdfc5fbf24d2ee196d52cb1a2f3fd996c40c1099 Mon Sep 17 00:00:00 2001 From: Augusto Date: Fri, 3 May 2019 11:45:02 +0100 Subject: [PATCH] itoabase exam exercise readme --- subjects/itoabase.en.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 subjects/itoabase.en.md diff --git a/subjects/itoabase.en.md b/subjects/itoabase.en.md new file mode 100644 index 00000000..fe4348bf --- /dev/null +++ b/subjects/itoabase.en.md @@ -0,0 +1,23 @@ +## itoabase + +### Instructions + +Write a function that converts an integer value to a null-terminated string +using the specified base and stores the result in a char array that you must +allocate. + +The base is expressed as an integer, from 2 to 16. The characters comprising +the base are the digits from 0 to 9, followed by uppercase letter from A to F. + +For example, base 4 would be "0123" and base 16 "0123456789ABCDEF". + +If base is 10 and value is negative, the resulting string is preceded with a +minus sign (-). With any other base, value is always considered unsigned. + +### Expected function + +```go +func ItoaBase(value, base int) string { + +} +``` \ No newline at end of file