Download - Program Menghitung Momen Balok Sederhana Dng Kantilever

Transcript
Page 1: Program Menghitung Momen Balok Sederhana Dng Kantilever

PROGRAM MENGHITUNG MOMEN BALOK SEDERHANA DNG

! KANTILEVER

!

REAL M1,M2,L,D,B,P,Q

10 WRITE(*,'(1X,A,\)')'NILAI L='

READ(*,*)L

WRITE(*,'(1X,A,\)')'NILAI D='

READ(*,*)D

WRITE(*,'(1X,A,\)')'NILAI B='

READ(*,*)B

WRITE(*,'(1X,A,\)')'NILAI P='

READ(*,*)P

WRITE(*,'(1X,A,\)')'NILAI Q='

READ(*,*)Q

! HITUNG NILAI RA DAN RB

RA=((P*(D-B))+(0.5*Q*D**2)-(0.5*Q*(L-D)**2))/D

RB=P+Q*L-RA

WRITE(*,*)'DATA PERHITUNGAN:'

WRITE(*,'(1X,A,F9.2)')'L= ',L

WRITE(*,'(1X,A,F9.2)')'D= ',D

WRITE(*,'(1X,A,F9.2)')'B= ',B

WRITE(*,'(1X,A,F9.2)')'P= ',P

WRITE(*,'(1X,A,F9.2)')'Q= ',Q

WRITE(*,'(1X,A,F9.2)')'RA= ',RA

WRITE(*,'(1X,A,F9.2)')'RB= ',RB

!HITUNG MOMEN

!D>L MAKSUDNYA tumpuanny DI LUAR GELAGAR (G DIITUNG)

!

IF(D.LT.L)THEN

Page 2: Program Menghitung Momen Balok Sederhana Dng Kantilever

M1=RA*B-0.5*Q*B**2

WRITE(*,'(1X,A,F9.2)')'MOMEN PADA TITIK BEBAN= ',M1

ELSE IF(D.GT.L)THEN

M2=RA*B+RB*(B-D)-0.5*Q*B**2

WRITE(*,'(1X,A,F9.2)')'MOMEN PADA TITIK BEBAN= ',M2

ENDIF

!PENAWARAN

WRITE(*,*)'APAKAH ANDA INGIN MENGHITUNG KEMBALI?'

WRITE(*,*)'1=YA, 2=TIDAK'

READ(*,*)V

IF(V.EQ.1)THEN

GOTO 10

ELSE IF(V.EQ.2)THEN

GOTO 20

ELSE

WRITE(*,*)'DATA YANG ANDA MASUKKAN TIDAK COCOK'

ENDIF

20 WRITE(*,*)'TERIMA KASIH'

END