Thread: Inverting number sequence.

  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, 01:03 AM
  2. Number sequence help
    By Shakti in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-26-2005, 08:36 AM
  3. number sequence
    By valleyboy in forum C Programming
    Replies: 1
    Last Post: 05-01-2005, 02:24 PM
  4. Prime number program problem
    By Guti14 in forum C Programming
    Replies: 11
    Last Post: 08-06-2004, 04: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