Thread: Programing problem

  1. #1
    Registered User
    Join Date
    Mar 2011

    Programing problem

    I am having trouble deriving the loop for this java problem. I need to find the smallest integers for a number inputed by the user. So for example the smallest integers for 100 are 2, 2, 5, 5. I know i need to increment the divisible number in the loop but I'm not sure how to exactly put that in or what loop to use. Any help would be appreciated.

  2. #2
    Registered User
    Join Date
    Jan 2007
    Euless, TX
    This isn't the Java forum --- it's 'C', even though the statements would be the same. So you're going to run a loop from 1 to 100 and test to see if that number in that loop is evenly divisible in 100 using an operator (same as in Java). In 'C', it's a 'for loop'.

    This pretty basic stuff. Read a tutorial on 'C' - then you won't be embarrassed when asking a question like this

  3. #3
    Registered User
    Join Date
    Sep 2008
    Toronto, Canada
    I think you're asking to find prime factors.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. My small programing problem
    By kordric in forum C++ Programming
    Replies: 4
    Last Post: 03-31-2008, 04:29 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM