Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  program distancia
Language: FORTRAN
Code:
     program distancia
          integer:: x1,x2,y1,y2,s1,s2,a,b,c,dist
          write (*,*) "coordenadas do eixo x"
          read (*,*) x1,x2
          write (*,*) "coordenadas do eixo y"
          read (*,*) y1,y2
            s1=x1-x2
            s2=y1-y2     
            a=s1**2
            b=s2**2
            c=a+b
            dist=sqrt(c)
          write (*,*) "a distancia é:" , dist
        end program distancia
Comments: