Please develop subroutine sort for the below program. Hint: maxval, minval,maxloc, or/and minloc commands might...
50.1K
Verified Solution
Link Copied!
Question
Accounting
Please develop subroutine sort for the below program. Hint: maxval, minval,maxloc, or/and minloc commands might be helpful. program Assignment06 implicit none real (Kind=4),dimension(10):: D integer:: i D=(/-68.47,94.11,91.43,-2.92,60.05,-71.62,-15.64,83.14,58.44,91.89/) call sort(D,'descending') do i=1,size(D,dim=1) print*, D(i) enddo contains subroutine sort(A,order) !======================================================! ! Subroutine SORT receives a one-dimensional array and ! ! sorts it in ascending or descending order. ! ! List of Arguments: ! ! input-&-output, real, A, an unknown size 1D array.! ! input, character, order, should be 'ascending' ! ! or 'descending' otherwise the array is sorted in ! ! ascending order. ! !======================================================! . . end subroutine sort end program Assignment06
fortran program is used, please upload screenshot of result and code
Answer & Explanation
Solved by verified expert
Get Answers to Unlimited Questions
Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!
Membership Benefits:
Unlimited Question Access with detailed Answers
Zin AI - 3 Million Words
10 Dall-E 3 Images
20 Plot Generations
Conversation with Dialogue Memory
No Ads, Ever!
Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!