please help me sos fortran program Input. txt includes the properties of the items inside a shipping container. The provided program below should sum up the total weight of the items inside the container and print it on the screen. The program is missing the expressions for variables is and ie. Complete the program by adding these expressions. input.txt ( Item: Organizer 35 compartments Weight: 109.5 Serial Number: 00245880 Status: in Item: 28 Morbylanga tables Weight: 699.3 Serial Number: 20293766 Status: in Item: 360m Mitted,LED chains Weight: 128.8 Serial Number: 90472514 Status: in Item: 2 Toyota Prado Weight: 2426.8 Serial Number: 00277989 Status: in Item: BRANAS, Laundry basket Q:28 Weight: 8.5 Serial Number: 202114731 Status: in program Program3PartA implicit none integer:: i,n,is,ie real:: total_weight,w character (len=100):: str open(10,file='Input.txt') total_weight=0.0; w=0; n=5 do i=1,n read(10,'(a)') str is= ie= read (str(is:ie),*) w total_weight=total_weight+w enddo print*, 'The total weight of the items in the container is:',total_weight end program Program3PartA partB Write a description (maximum three sentences) for the below subroutine. Specify what exactly the subroutine does, and what are the input/output arguments of the subroutine. subroutine sub(M) !-----------------------------------------------! !   description                                                         ! !-----------------------------------------------! real, dimension(:,:), intent(inout):: M real, dimension(:), allocatable:: tmp integer::i,j,n(2) n=shape(M) allocate(tmp(n(2))) do i=1,n(1) do j=i+1,n(1) if (sum(M(j,:)) > sum(M(i,:))) then    tmp=M(i,:); M(i,:)=M(j,:); M(j,:)=tmp endif enddo enddo deallocate(tmp) end subroutine sub    No hand written and fast answer with explanation

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

please help me sos fortran program

Input. txt includes the properties of the items inside a shipping container. The provided
program below should sum up the total weight of the items inside the container and print it on the
screen. The program is missing the expressions for variables is and ie. Complete the program by
adding these expressions.

input.txt

(

Item: Organizer 35 compartments Weight: 109.5 Serial Number: 00245880 Status: in Item: 28 Morbylanga tables Weight: 699.3 Serial Number: 20293766 Status: in Item: 360m Mitted,LED chains Weight: 128.8 Serial Number: 90472514 Status: in Item: 2 Toyota Prado Weight: 2426.8 Serial Number: 00277989 Status: in Item: BRANAS, Laundry basket Q:28 Weight: 8.5 Serial Number: 202114731 Status: in

program Program3PartA
implicit none
integer:: i,n,is,ie
real:: total_weight,w
character (len=100):: str
open(10,file='Input.txt')
total_weight=0.0; w=0; n=5
do i=1,n
read(10,'(a)') str
is=
ie=
read (str(is:ie),*) w
total_weight=total_weight+w
enddo
print*, 'The total weight of the items in the container is:',total_weight
end program Program3PartA

partB

Write a description (maximum three sentences) for the below subroutine. Specify what exactly the
subroutine does, and what are the input/output arguments of the subroutine.

subroutine sub(M)
!-----------------------------------------------!
!   description                                                         !
!-----------------------------------------------!
real, dimension(:,:), intent(inout):: M
real, dimension(:), allocatable:: tmp
integer::i,j,n(2)
n=shape(M)
allocate(tmp(n(2)))
do i=1,n(1)
do j=i+1,n(1)
if (sum(M(j,:)) > sum(M(i,:))) then
   tmp=M(i,:); M(i,:)=M(j,:); M(j,:)=tmp
endif
enddo
enddo
deallocate(tmp)
end subroutine sub 

 

No hand written and fast answer with explanation 

Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education