Question: Fortran Write the sorted array to the file 'BubbleOut.txt' Compare user time on files Num2.txt and Num3.txt time ./Bubble Num2 has 30,000 numbers and Num3
Fortran
Write the sorted array to the file 'BubbleOut.txt' Compare user time on files Num2.txt and Num3.txt time ./Bubble Num2 has 30,000 numbers and Num3 had 60,000 numbers ! Declare Variables integer :: i, j, n real, allocatable :: A(:) real :: Temp
! Program body do i = 1, n do j = 1, n - 1 if (A(j) .gt. A(j+1)) then Temp = A(j) A(j) = A(j+1) A(j+1) = Temp endif enddo enddo
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
