Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A program to take in a large number and output a smaller number

Status
Not open for further replies.

godonga

Technical User
Mar 19, 2006
25
0
0
ZA
Hi
This question may sound wierd but I really need you help. I need to come up with a program that takes in at least a 16 digit number and outputs say a 6 digit number. I should be able to do the reverse as well i.e. put in the 6 digit number and output the exact 16 digit number.

Any ideas?

G
 
What permutation will you use to convert the 16-digit number to a six-digit number, and vice versa?

----
 
Indeed... Base 16 (Hex) will only let you squeeze in 8 [Base 10] digits... so you'd need a different algorithm. Perhaps Base 64 or something that is well documented or may already have library functions written.

I'm sure Google will help turn up algorithms.

Hope this helps,

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top