Question: Use the equation ( ) = sin ( 5 2 ) where x is in degrees and ranges from 1 0 to 1 ( x
Use the equation sin where x is in degrees and ranges from to x
to populate an array. Then, develop a function that will sort those values in descending
order highest to lowest and return them. Print the sorted array in the spreadsheet. You must
use a for loop or a while loop to sort the array. Codes that have hardcoded positions will
not be accepted. Please read the hints below before attempting to solve this problem.
Hint #: Convert the results of x to radians before calculating the value of sine
Hint #: DO NOT declare fixedlength arrays in this problem. You will have to declare them
without length eg: Dim Arr as double and later use the command ReDimeg:
ReDim Arrwhole number to change the length of each array individually. If you
dont do that, VBA will yield and error when trying to return an array from your function.
Hint #: You may use as many arrays as you would like. However, the easiest way to code this
function is to pass an array from
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
