C++ code needed urgent

http://www2.latech.edu/~mcorley/meen292/spring2007/id30.htm
________________________________________________________________________

Thermistors are temperature-measuring devices based on the principle that the thermistor material exhibits a change in electrical resistance with a change in temperature. By measuring the resistance of the thermistor material, one can then determine the temperature. Thermistors are generally a piece of semiconductor made from metal oxides such as those of manganese, nickel, cobalt, etc. These pieces may be made into a bead, disk, wafer, etc., depending on the application.

There are two types of thermistors--negative temperature coefficient (NTC) and positive temperature coefficient (PTC) thermistors. For NTC's, the resistance decreases with temperature, while for PTC's the temperature increases with temperature. It is the NTC's that are generally used for temperature measurement. The following characteristics make thermistors a good choice for many temperature measurement applications:
high sensitivity, which gives good accuracy
fast dynamic response, which allows quicker measurements
relatively high resistance, which reduces the errors introduced by the resistance of the lead wires.

But thermistors have a nonlinear output and are valued for a limited range. So, when a thermistor is manufactured, the manufacturer supplies a resistance vs. temperature curve. The curve generally used that gives an accurate representation is given by

where
T is the temperature in Kelvins
R is the resistance in ohms
a0, a1, a2, a3 are constants of the calibration curve.

Visit www.betatherm.com for an extension compilation of information on thermistors. Specifically, note that the Steinhart-Hart thermistor equation forces coefficient a2 in the equation above to zero.

Plot the resistance vs. temperature curve for the BetaTHERM 10K3A1A device over the entire range from -80 degrees Celsius to +150

bilderbikkel