Sei sulla pagina 1di 5

# M.

WRITE(*,*)

## WRITE(*,*)"OLEH M.RIZKY HARI SAPUTRA"

WRITE(*,*)

1 WRITE(*,*)"Metode : "

WRITE(*,*)

IF(T.EQ.1 ) THEN

WRITE(*,*)

WRITE(*,*)

WRITE(*,*)

## 2 WRITE(*,*)"Masukkan Nilai A pada Fungsi : "

FA = 3*(A**3)+4*(A**2)+3*A-5

WRITE(*,*)"F(A) : ",FA

WRITE(*,*)

## M.RIZKY HARI SAPUTRA/125060101111008/18/TUGAS PROKOM/8 MEI 2014 1

M.RIZKY HARI SAPUTRA/125060101111008/18/TUGAS PROKOM/8 MEI 2014

FB = 3*(B**3)+4*(B**2)+3*B-5

WRITE(*,*)"F(B) : ",FB

WRITE(*,*)

## WRITE(*,*)"Pengecekan Nilai A dan B"

WRITE(*,*)

IF(FA.NE.FB) THEN

C = (A+B)/2

FC = 3*(C**3)+4*(C**2)+3*C-5

WRITE(*,*)"C = (A+B)/2"

WRITE(*,*)

WRITE(*,*)"Nilai C : ",C

WRITE(*,*)"F(C) : ",FC

WRITE(*,*)

## WRITE(*,*)"Lakukan Iterasi Ke - 1"

WRITE(*,*)

WRITE(*,*)

B1 = B

C1 = C

FC1 = 3*(C1**3)+4*(C1**2)+3*C1-5

FB1 = 3*(B1**3)+4*(B1**2)+3*B1-5

WRITE(*,*)""

## M.RIZKY HARI SAPUTRA/125060101111008/18/TUGAS PROKOM/8 MEI 2014 2

M.RIZKY HARI SAPUTRA/125060101111008/18/TUGAS PROKOM/8 MEI 2014

WRITE(*,*)"F(A) : ",FC1

WRITE(*,*)

WRITE(*,*)"F(B) : ",FB1

C1 = (B1+C1)/2

FC1 = 3*(C1**3)+4*(C1**2)+3*C1-5

WRITE(*,*)

WRITE(*,*)" C : ",C1

WRITE(*,*)"F(C) : ",FC1

WRITE(*,*)

## WRITE(*,*)"Lakukan Iterasi Ke - 2"

WRITE(*,*)

WRITE(*,*)

B2 = C

C2 = C1

FC2 = 3*(C2**3)+4*(C2**2)+3*C2-5

FB2 = 3*(B2**3)+4*(B2**2)+3*B2-5

WRITE(*,*)""

WRITE(*,*)"F(A) : ",FC2

WRITE(*,*)

WRITE(*,*)"F(B) : ",FB2

C2 = (B2+C2)/2

FC2 = 3*(C2**3)+4*(C2**2)+3*C2-5

## M.RIZKY HARI SAPUTRA/125060101111008/18/TUGAS PROKOM/8 MEI 2014 3

M.RIZKY HARI SAPUTRA/125060101111008/18/TUGAS PROKOM/8 MEI 2014

WRITE(*,*)

WRITE(*,*)"C : ",C2

WRITE(*,*)"F(C) : ",FC2

WRITE(*,*)

GOTO 2

END IF

END IF

## WRITE(*,*)"Ingin Menghitung Lagi ?"

WRITE(*,*)"1. Gas"

WRITE(*,*)

IF(P.EQ.1 ) THEN

GOTO 1

## M.RIZKY HARI SAPUTRA/125060101111008/18/TUGAS PROKOM/8 MEI 2014 4

M.RIZKY HARI SAPUTRA/125060101111008/18/TUGAS PROKOM/8 MEI 2014

WRITE(*,*)

WRITE(*,*)"Suwun Bro"

END IF

STOP

END