Fortran Problem
2. দুইটি matrix এর বিয়োগ
1 2 3
ধরা যাক A = 1 2 3
1 2 3
3 2 1
এবং B= 3 2 1
3 2 1
Solution
C=A-B
Dimension A(3,3),B(3,3),C(3,3)
write(*,*) 'enter the value of matrix A'
do i= 1,3
do j=1,3
read(*,*) A(i,j)
end do
end do
write(*,*) 'enter the value of matrix B'
do i=1,3
do j=1,3
read(*,*) B(i,j)
end do
end do
do i=1,3
do j=1,3
C(i,j)=A(i,j)-B(i,j)
end do
end do
write(*,*) C(1,1) ,C(1,2) ,C(1,3)
write(*,*) C(3,1) ,C(2,2) ,C(2,3)
write(*,*) C(3,1) ,C(3,2) ,C(3,3)
End
বি.দ্র : just copy this program and paste in your force2.0 and try to write this yourself .
Best of Luck............................
2. দুইটি matrix এর বিয়োগ
1 2 3
ধরা যাক A = 1 2 3
1 2 3
3 2 1
এবং B= 3 2 1
3 2 1
Solution
C=A-B
Dimension A(3,3),B(3,3),C(3,3)
write(*,*) 'enter the value of matrix A'
do i= 1,3
do j=1,3
read(*,*) A(i,j)
end do
end do
write(*,*) 'enter the value of matrix B'
do i=1,3
do j=1,3
read(*,*) B(i,j)
end do
end do
do i=1,3
do j=1,3
C(i,j)=A(i,j)-B(i,j)
end do
end do
write(*,*) C(1,1) ,C(1,2) ,C(1,3)
write(*,*) C(3,1) ,C(2,2) ,C(2,3)
write(*,*) C(3,1) ,C(3,2) ,C(3,3)
End
বি.দ্র : just copy this program and paste in your force2.0 and try to write this yourself .
Best of Luck............................
No comments:
Post a Comment