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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

comman to inverte the order of print

Status
Not open for further replies.

hpftcb

Technical User
Apr 28, 2011
1
BR
Using a do command to create a converter fo base 10 to base 2 number, is there a command to invert the order of print? The last print becomes the first and consecutively
 
Just take mod 2 and save the result then divide the original number by 2. Keep the answers in an array. Keep on doing that while the number is non zero.

When the number reaches zero, print the array from back to front.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top