well i have been told to write a 7 segmet display so when i type in a number the numbers 'convert' and output to a seven segment display

basically from

8 to this:-
_
|_|
|_|

like in petrol stations

does anyone know how i could do this,

i have written these seven segemt displas in pascal

writeln('   ');
         writeln('  |');
         writeln('  |');
      end;

     procedure Two;
      begin
         writeln(' _ ');
         writeln(' _|');
         writeln('|_ ');
      end;

     procedure Three;
      begin
         writeln(' _ ');
         writeln(' _|');
         writeln(' _|');
      end;

     procedure Four;
      begin
         writeln('   ');
         writeln('|_|');
         writeln('  |');
      end;

     procedure Five;
      begin
         writeln(' _ ');
         writeln('|_ ');
         writeln(' _|');
      end;

     procedure Six;
      begin
         writeln(' _ ');
         writeln('|_ ');
         writeln('|_|');
      end;

     procedure Seven;
      begin
         writeln(' _ ');
         writeln('  |');
         writeln('  |');
      end;

     procedure Eight;
      begin
         writeln(' _ ');
         writeln('|_|');
         writeln('|_|');
      end;

     procedure Nine;
      begin
         writeln(' _ ');
         writeln('|_|');
         writeln('  |');
      end;

     procedure Zero;
      begin
         writeln(' _ ');
         writeln('| |');
         writeln('|_|');

THANK YOU

This article has been dead for over six months. Start a new discussion instead.