I am trying to develop an algorith for a short program i need to
write, I will explain the program:
it is to be a non-returning function/percedure, whatever you prefer.
there is two incoming values, one is "output(some languages may not
need to pass the output, you need not worry about this much though)"
one is an Integer, say "j". The function/procedure will take the
integer, lets assume j=1234567, and add commas outputting to the
screen like 1,234,567. TWO IMPORTANT THINGS: function MUST use
RECURSION, and at the end of the function/procedure "j" but be the
same as it was coming into the function(change it back if it is messed
with).
You DONT have to write the code, word for word because I am not
writing the program in C++ exactly, but a good skeleton would be nice.
Thanks. |