smallest digit of a number

This is a discussion on smallest digit of a number within the C Programming forums, part of the General Programming Boards category; hi friends I need a logic for finding a smallest digit of a number and at the same time how ...

  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をこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,413
    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, 04:00 PM

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