Page 1 of 1

Question 14 10 pts Assume that function random() is available to generate a random number from 0 to 1000 (i.e., set myRa

Posted: Sun May 15, 2022 8:26 am
by answerhappygod
Question 14 10 Pts Assume That Function Random Is Available To Generate A Random Number From 0 To 1000 I E Set Myra 1
Question 14 10 Pts Assume That Function Random Is Available To Generate A Random Number From 0 To 1000 I E Set Myra 1 (44.95 KiB) Viewed 42 times
answer in psuesdo code
Question 14 10 pts Assume that function random() is available to generate a random number from 0 to 1000 (i.e., set myRandom = random() would assign a value between 0 to 1000 to myRandom). Provide necessary steps to assign a random value to an Integer variable, myRandom. You should be able to complete part b using one step, but feel free to use more than one step if needed. Note: you cannot use random(x, y) to generate a value between x and y like pseudocode in book for this problem. Hint: you can get a random number between 0 and 1 by performing random() % 2. a. A random number between 1 and 5 b. An odd random number between 1 and 10 (hint: how many different values?) 1/ copy/paste and provide answers below: a. b. Edit View Insert Format Tools Table 12pt Paragraph