Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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::

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Accounting Tools for business decision making

Authors: Paul D. Kimmel, Jerry J. Weygandt, Donald E. Kieso

6th Edition

978-1119191674, 047053477X, 111919167X, 978-0470534779

Students also viewed these Accounting questions