Professional Documents
Culture Documents
implicit none
real::K,C,F,R
integer::temp
read(*,*) temp
if(temp==1) then
call patatas(C,K)
else
if(temp==2) then
call patatas2(F,K)
else
if(temp==3) then
call patatas3(R,K)
else
call patatas4(K)
end if
end if
end if
end program
subroutine patatas(C,K)
implicit none
Real::C,K
K=C+273.15
write(*,*)'K=', K
return
end subroutine
subroutine patatas2(F,K)
implicit none
Real::F,K
write(*,*) 'Ingrese la temperatura en Farenheit'
read(*,*) F
K=((F-32)/1.8)+273.15
write(*,*)'K=', K
return
end subroutine
subroutine patatas3(R,K)
implicit none
Real::R,K
K=((R-491.67)/1.8)+273.15
write(*,*)'K=', K
return
end subroutine
subroutine patatas4(K)
implicit none
Real::K
write(*,*)'K=', K
return
end subroutine