Google Answers Logo
View Question
 
Q: program/algorithm/c++ ( No Answer,   0 Comments )
Question  
Subject: program/algorithm/c++
Category: Computers > Programming
Asked by: linkinpark-ga
List Price: $5.00
Posted: 23 May 2003 10:33 PDT
Expires: 25 May 2003 05:45 PDT
Question ID: 207775
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.

Clarification of Question by linkinpark-ga on 23 May 2003 10:37 PDT
Sorry, It will be a function/precedure, not a program in the first
sentence of my question

Clarification of Question by linkinpark-ga on 23 May 2003 10:54 PDT
more important things, assume you have these operations:
n.removenum(i): "removes last digit of n, asigns that digit to i"
n.appendnum(i): "appends 'i' to end of 'n'"
n.length():length of n
n.compare(n2):returns -1 if n<n2, 1 if n>n2, 0 if n=n2

that should be it
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy