% File: tconv.m (an interactive console program for converting temperatures)  
%
% Purpose
%
% Convert entered temperatures from degrees Fahrenheit to Kelvin.
%
% Input(s)
%
% A valid temperature in degrees Fahrenheit. No error checking is done.
%
% Output(s)
%
% The Kelvin equivalent of the entered temperature.
%
% Revsion History
%
% Created 11/26/06 by Dr. C. S. Tritt
%
% Variables Used
%
% temp_f -- Entered temperature in Fahrenheit.
% temp_k -- Converted temperature in Kelvin.

%Prompt user for input.
temp_f = input('Enter the temperature in deg. F: ');

%Convert to Kelvin
temp_k = 5./9.*(temp_f - 32.) + 273.15;

%Display the result. Don't forget the newline.
fprintf('%6.2f deg. F = %6.2f K\n', temp_f, temp_k);