Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for Using JavaScript for arrays and loops

Current License: CC BY-SA 3.0

Post Revisions

12 events
when toggle format what by license comment
Oct 9, 2014 at 8:34 vote accept Community Bot
Oct 8, 2014 at 10:48 review Close votes
Oct 15, 2014 at 0:03
Oct 8, 2014 at 10:30 comment added user2982634 Of course i understand that im just looking for some help on where to go after the code i have written like what functions or processes i could use to obtain the output
Oct 8, 2014 at 10:29 answer added Jamiec timeline score: 6
Oct 8, 2014 at 10:26 comment added Jamiec Makes a lot more sense given the actual assignmnet. But this is homework, so dont expect a full working solution - thats what you're supposed to do.
Oct 8, 2014 at 10:25 comment added user2982634 and no output should differ by the others by more than 1.
Oct 8, 2014 at 10:24 comment added user2982634 This is the assignment i was given... A trader is taking his goods to market on a train of 12 camels. He wants to divide the load evenly, but since the number of goods might not be an exact multiple of 12, some camels will have to carry one extra. To be fair on the animals, the trader wants to distribute the extra load randomly. Write a procedure that distributes the load. It should have 1 input parameter that defines the number of goods, and have 12 output parameters - one for each camel. The sum of the outputs should be the same as the input. Each output should be an integer,
Oct 8, 2014 at 10:23 comment added Cerbrus ... How? What is the exact requirement / assignment?
Oct 8, 2014 at 10:22 comment added user2982634 yes sorry, so for example if the input is 30 the output should be something like 2 3 3 2 2 3 2 3 3 2 3 2
Oct 8, 2014 at 10:22 history edited Cerbrus CC BY-SA 3.0
added 20 characters in body
Oct 8, 2014 at 10:21 comment added 0xMB Can you give an example of the expected output?
Oct 8, 2014 at 10:17 history asked user2982634 CC BY-SA 3.0

AltStyle によって変換されたページ (->オリジナル) /