Thread: smallest digit of a number

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    1

    smallest digit of a number

    hi friends

    I need a logic for finding a smallest digit of a number and at the same time how many times it is occured

    For ex
    Input number = 7334533

    Ans: OUTPUT

    smallest digit of a number = 3
    no of times it occured = 4

    Any body help me to write the logic for this program without using pointers

    Thanks in Advance

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Basically, convert to string, scan for lowest character, then count 'em.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. smallest largest number
    By manzoor in forum C++ Programming
    Replies: 10
    Last Post: 05-12-2008, 07:56 AM
  2. Nim Trainer
    By guesst in forum Game Programming
    Replies: 3
    Last Post: 05-04-2008, 04:11 PM
  3. Logical errors with seach function
    By Taka in forum C Programming
    Replies: 4
    Last Post: 09-18-2006, 05:20 AM
  4. Replies: 4
    Last Post: 07-14-2003, 08:11 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