Given that length
is 24 and height is 15. Then do the following operation by subroutine
subprogram.
Solution:
Real L,H
Do k = 1,4
Write(*,*) 'Enter the values of H and
L'
Read(*,*) H , L
Call MAK(H,L,V,A)
Write(*,*) ' H
L V A'
Write(*,*) H,L,V,A
End do
End
subroutine MAK(H,L,V,A)
Pi=3.1416
q=(L**2+4*h**2)/(8*H)
w=H/3
V=pi*H**2*(q-w)
A=(Pi*(2*H**2+L**2))/2
Return
End
No comments:
Post a Comment