Create an array of size 10 and name RandArray populate the RandArray with random integer from 1 to 20. Every element in the RandArray must be changed as follows: If the value of the element is less...




Create an array of size 10 and  nameRandArray populate the RandArray with random integer from 1 to 20.



Every element in theRandArray must be changed as follows:




  • If the value of the element is less than the array index, the element must be replaced



with the index plus 10.




  • If the value of the element is equal to the index, the element must be doubled.


  • If the value of the element is greater than the index, the element must be replaced by



the index squared.



Print the original number and the changed number of theRandArray.





HTML EditorKeyboard Shortcuts




Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here