Jump to content

heeelp with solving a problem

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
imapwnulol

imapwnulol

    Newbie

  • Members
  • Pip
  • 9 posts
this is about pascal so i'm writing it here cause delphi is the closest thing...

i have this problem of making a program that will show the number of factors that can divide the integer you input.
for example if input is 10, output is 4 (1, 2, 5, 10).

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Do you know how to tell if a number is a factor of 10?
Do you know how to loop from 1 to the number entered?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
imapwnulol

imapwnulol

    Newbie

  • Members
  • Pip
  • 9 posts
actually i don't. i guess i'd have to make the computer try dividing the number with all the smaller numbers, but how to leave ones that can't divide it, and how to count them?

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Look up modular division.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog