subroutine terker(a,b,t,k) real a,b,t,k k=2*(a+b) t=a*b return end program teglalap real x,y,ter,ker c tglalap adatai real a c folytatshoz: a=2 write(*,71) 71 format('Ez a program tglalapok terletnek s kerletnek',/, x'meghatrozsra alkalmas.') 10 continue write(*,78) 78 format('rd be azegyik oldal hosszt!') read(*,72)x 72 format(f6.0) write(*,73) 73 format('Most a msik oldalt add meg!') read(*,72)y call terker(x,y,ter,ker) write(*,75)ter,ker 75 format('terlet:',f6.0,' kerlet:',f6.0) write(*,76) 76 format('Folytatnd? rj be egy kettest!') read(*,77)a 77 format(f6.0) if(a.eq.2) goto 10 end