Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  test9
Language: FORTRAN
Code:
     program hello1
        real:: rr, del, dexc, den1
        real,dimension(3):: ds, s0, s1, s01, s02
     real,dimension(3):: s03, s04, s05, s06
        ds(1)=2.0
        ds(2)=3.0
        ds(3)=4.0
        s0(1)=1.0
        s0(2)=5.0
        s0(3)=3.0
          s01(1)=1.0
        s01(2)=5.0
        s01(3)=3.0
          s02(1)=1.0
        s02(2)=5.0
        s02(3)=3.0
          s03(1)=1.0
        s03(2)=5.0
        s03(3)=3.0
          s04(1)=1.0
        s04(2)=5.0
        s04(3)=3.0
          s05(1)=1.0
        s05(2)=5.0
        s05(3)=3.0
          s06(1)=1.0
        s06(2)=5.0
        s06(3)=3.0
        del=2.0
          dexc=2.0
        !rr=sum(s0+ds*del)
        s1=s0+ds*del
        rr=sqrt(sum(s1*s1))
        s1=s1/rr
        ds=s1-s0
          den1=-dexc*sum(ds*(s01+s02+s03+s04+s05+s06))
        !print *,ds(1)
        !print *,ds(2)
        !print *,ds(3)
        print *,den1
        read *, rr
        end program hello1        
Comments: