Need Help!
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Need Help!

  1. #1
    Join Date
    Apr 2013
    Posts
    2

    Need Help!

    I need to know how to code the following problems.. I am stuck
    1) A positive integer is classified as being deficient, perfect, or abundant - depending on
    whether the sum of the divisors of N is less than, equal to, or greater than N. In summing the
    divisors, 1 is included, but N itself is not. For example, the divisors of 4 are 1 and 2; since 1
    + 2 =3, is a deficient number. The divisors of 6 are 1,2, and 3; since 1+2+3 = 6, 6 is a
    perfect number. The divisors of 12 are 1, 2, 3, 4, and 6; since 1+2+3+4+6=16,12 is an
    abundant number. Write a program that accepts a positive integer as input, and reports its
    classification.

    2) Mathematicians study a class of problems known as random walk problems. The following
    is an example. The suspended foot bridge over the Epsilon River is 20 steps across and 8
    steps wide. After having spent too many hours drinking at a nearby pub, a person walking
    home must cross this bridge. Each time this person takes a step forward across this wobbly
    bridge he also takes a step to one side or the other. The probability of a step to the left is
    exactly equal to the probability of a step to the right. This person steps on to the bridge
    exactly on the centre line, but if he should travel to the left or right more than 4 steps, he
    will fall off. Simulate the bridge crossing 100 times to find out what percentage of the time
    the person will successfully make it to the other side without falling off.

  2. #2
    Join Date
    Jul 2005
    Posts
    1,074

    Re: Need Help!

    Do You know how to resolve them manually ?
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  3. #3
    Join Date
    Apr 2013
    Posts
    2

    Re: Need Help!

    No I don't know.. I'm actually new with Visual Basic so I need to know how to code these problems

  4. #4
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,985

    Re: Need Help!

    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center