Inverting number sequence.

This is a discussion on Inverting number sequence. within the C++ Programming forums, part of the General Programming Boards category; C++ beginner here. Just wanted to know how one can invert number sequence i.e. 234 becomes 432. Thanks!...

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    102

    Inverting number sequence.

    C++ beginner here.

    Just wanted to know how one can invert number sequence i.e. 234 becomes 432.

    Thanks!

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    There's no "instant" way. You'll need to read it, digit by digit, divide by 10 to get to the next digit, and multiply another number and add the digit there...

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    102
    Thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. scanf oddities
    By robwhit in forum C Programming
    Replies: 5
    Last Post: 09-22-2007, 02:03 AM
  2. Number sequence help
    By Shakti in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-26-2005, 09:36 AM
  3. number sequence
    By valleyboy in forum C Programming
    Replies: 1
    Last Post: 05-01-2005, 03:24 PM
  4. Prime number program problem
    By Guti14 in forum C Programming
    Replies: 11
    Last Post: 08-06-2004, 05:25 AM
  5. Random Number problem in number guessing game...
    By -leech- in forum Windows Programming
    Replies: 8
    Last Post: 01-15-2002, 05:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21