Thread: Random numbers generator & Division algorithm

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    2

    Question Random numbers generator & Division algorithm

    Hello Guys,

    I am a new c learner. I have been trying to figure out this problem for hours. Learnt how the rand() works but could not be able to come up with the solution of this problem. Can any body help please ?

    Problem: Using random number generator generate two numbers n є [-50, 50] and p є [0, |n|] . Next using Division Algorithm find n div p, n mod p. Write relevant program.

  2. #2
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    What have you tried so far, also read our homework policy. We will help you, but we won't do the assignment for you.

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    2

    Its just a practice, not homework.

    Quote Originally Posted by abachler View Post
    What have you tried so far, also read our homework policy. We will help you, but we won't do the assignment for you.
    Thanks for the reply dude. This isnt a homework, it is just a practice.

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by newclearner View Post
    Thanks for the reply dude. This isnt a homework, it is just a practice.
    Why do you think that makes a difference?

  5. #5
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by newclearner View Post
    Thanks for the reply dude. This isnt a homework, it is just a practice.
    We still won't do it for you. Most of us are busy professional programmers, if you can't be bothered to make an effort then we can't be bothered to help you. Post the code you have tried and we will help you figure out why it isn't working.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. questions....so many questions about random numbers....
    By face_master in forum C++ Programming
    Replies: 2
    Last Post: 07-30-2009, 08:47 AM
  2. Question about random numbers
    By Kempelen in forum C Programming
    Replies: 2
    Last Post: 07-02-2008, 06:28 AM
  3. Generatin Random Numbers
    By dantu1985 in forum C Programming
    Replies: 15
    Last Post: 08-13-2007, 01:21 AM
  4. Another brain block... Random Numbers
    By DanFraser in forum C# Programming
    Replies: 2
    Last Post: 01-23-2005, 05:51 PM
  5. Random character generator algorithm
    By m712 in forum C++ Programming
    Replies: 7
    Last Post: 12-09-2002, 04:28 AM

Tags for this Thread