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.