Question: Use the equation ( ) = sin ( 5 2 ) where x is in degrees and ranges from 1 0 to 1 ( x

Use the equation ()= sin (52) where x is in degrees and ranges from 10 to 1(x =10,9,
8,...,1) 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 #1: Convert the results of 5x -2 to radians before calculating the value of sine.
Hint #2: DO NOT declare fixed-length arrays in this problem. You will have to declare them
without length (e.g.: Dim Arr1() as double) and later use the command ReDim(e.g.:
ReDim Arr1(*whole 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 #3: 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!