Copy and paste the text below, or save it as a .bas file, to run in QBASIC.

----------

INPUT "Enter Biot number, Fourier number"; bi#, fo#
IF bi# < 1# THEN stp# = .000001# ELSE stp# = .00001#
pi# = 3.141592653#: DIM xi#(4): DIM c#(4)
FOR n# = 1# TO 4#: REM***Find 1st 4 roots of transcendental equation
FOR xi# = (n# - 1#) * pi# TO n# * pi# STEP stp#
diff# = bi# - xi# * TAN(xi#)
IF diff# < 0# THEN 20
NEXT xi#
20 xi#(n#) = xi#: REM***Find the corresponding Cn coefficient
c#(n#) = 4# * SIN(xi#) / (2# * xi# + SIN(2# * xi#))
NEXT n#
PRINT : PRINT "The first four roots of the transcendental equation XIn are:"
FOR n# = 1# TO 4#: PRINT xi#(n#): NEXT n#
PRINT "The first four Cn coefficients are:"; ""
FOR n# = 1# TO 4#: PRINT c#(n#): NEXT n#
PRINT "Press any key to display temperatures"
50 IF INKEY$ = "" THEN 50
PRINT "The temperatures at various points are:"
FOR xast# = 0# TO 1.01# STEP .05#: FOR n# = 1# TO 4#
theta# = c#(n#) * EXP(-1# * xi#(n#) ^ 2# * fo#) * COS(xi#(n#) * xast#)
thetaast# = thetaast# + theta#: NEXT n#
PRINT "X*, Theta* ="; xast#, thetaast#
thetaast# = 0#: NEXT xast#
REM***Find proportion of energy transferred
FOR xast# = 0# TO 1.009# STEP .01#: FOR n# = 1# TO 4#
theta# = c#(n#) * EXP(-1# * xi#(n#) ^ 2# * fo#) * COS(xi#(n#) * xast#)
thetaast# = thetaast# + theta#: NEXT n#
thetatotal# = thetatotal# + thetaast#: m# = m# + 1#
thetaast# = 0#: NEXT xast#
thetaav# = thetatotal# / m#
PRINT "Proportion of energy transferred ="; 1# - thetaav#
RUN
----------