program av(input, output); (* av: average integers Tom Schneider NCI/FCRDC Bldg 469. Room 144 P.O. Box B Frederick, MD 21702-1201 (301) 846-5581 (-5532 for messages) network address: toms@ncifcrf.gov National Cancer Institute Laboratory of Mathematical Biology 1992 *) const (* begin module version *) version = 1.03; (* of av.p 1992 Jun 2 origin 1992 apr 81 *) (* end module version *) (* begin module describe.av *) (* name av: average integers synopsis av(input: in, output: out) files input: give pairs of integers output: rounded average of the integers description Genbank features are given as endpoints; we need to convert to the central base for delila instructions. This program lets one do that. The program rounds the result. examples documentation see also author Thomas Dana Schneider bugs technical notes *) (* end module describe.av *) (* begin module av.themain *) procedure themain; (* the main procedure of the program *) var a,b,c: integer; begin writeln(output,'av: average with rounding ',version:4:2); repeat writeln(output,'Enter pairs of integers, "0 0" to quit'); readln(input,a,b); if (a <> 0) or (b <> 0) then begin c := round((a+b)/2); writeln(output,'(',a:1,' + ',b:1,')/2 = ',c:1); end; until (a = 0) and (b = 0) end; (* end module av.themain *) begin themain; end.