Darn! You left your stdlib at home! Without your essential C libaries, you need to write a function that, given an integer converts it to a string in reverse. Negative integers should be printed in reverse, but have a negative symbol prepended.
Start writing your function using this wrapper. Feel free to adapt it to your language of choice.
#include <stdlib.h>
#include <stdio.h>
char * myItoaReversed(int number) {
return "Implement Me!";
}
int main() {
int number;
scanf("%d", &number);
char * numberAsString = myItoaReversed(number);
printf("%s\n", numberAsString);
}
1000
0001
-1872
-2781