Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program TEST
- dimension a(100, 100)
- real g, t
- integer i,j,n,m,p
- m=5
- n=7
- print*, 'введите матрицу'
- do i=1,m
- read*,(a(i,j),j=1,n)
- end do
- g=-100000
- do i=1,m
- do j=1,n
- if(a(i,j)>g) then
- g=a(i,j)
- a(i,n+1)=g
- end if
- end do
- g=-10000
- end do
- do i=1,m-1
- do p=i+1,m
- do j=1,n+1
- if (a(p,n+1)<=a(i,n+1)) then
- t=a(i,j)
- a(i,j)=a(p,j)
- a(p,j)=t
- end if
- end do
- end do
- end do
- print *, "измененный массив"
- do i=1, m
- print*,(a(i,j),j=1,n)
- end do
- stop
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement