VETORES
Fortran
program VETORES
Implicit None
Integer(4)::i
Real(8), Dimension(3)::u,v, vetorial
Real(8):: ESCALAR
READ(*,*) u(1),u(2),u(3)
READ(*,*)
READ(*,*) v(1),v(2),v(3)
write(*,*) u
write(*,*) v
!PRODUTO ESCALAR
ESCALAR = u(1)*v(1)+u(2)*v(2)+u(3)*v(3)
write(*,*)ESCALAR
!PRODUTO VETORIAL
vetorial (1)=u(2)*v(3)-u(3)*v(2)
vetorial (2)=u(3)*v(1)-u(1)*v(3)
vetorial (3)=u(1)*v(2)-u(2)*v(1)
write (*,*) vetorial
end program VETORES
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.