(* Collection of code snippets by Arne Vajhøj *)
(* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) *)
program artificialstupidity(input,output);

type
   pstr = varying [255] of char;

function get_wattage(sys : pstr) : integer;

begin
   get_wattage := (trunc(random * 1000000) mod 20) * 50 + 200;
end;

var
   sys1, sys2 : pstr;
   watt1, watt2 : integer;

begin
   seed(clock);
   writeln('Utility to check power supply compatibility.');
   write('Enter name of system #1: ');
   readln(sys1);
   write('Enter name of system #2: ');
   readln(sys2);
   watt1 := get_wattage(sys1);
   watt2 := get_wattage(sys2);
   if watt1 = watt2 then begin
      writeln(sys1, ' and ', sys2, ' can use the same power supply (', watt1:1, ' watt)');
   end else begin
      writeln(sys1, ' and ', sys2, ' cannot use the same power supply as they use ', watt1:1, ' and ', watt2:1, ' watt');
   end;
end.
