Program pag16_40;
const c1=1;   c2=5;   c3=10;
      c4=20;  c5=50;  c6=100;
      c7=200; c8=500; c9=1000;
var s,s1:integer;
    b1,b2,b3,b4,b5,b6,b7,b8,b9:integer;
begin
Writeln(#$D#$A+'Introdu suma lei!'); ReadLn(s);
s1:=s;
b9:=s1 div c9; s1:=s1 mod c9;
b8:=s1 div c8; s1:=s1 mod c8;
b7:=s1 div c7; s1:=s1 mod c7;
b6:=s1 div c6; s1:=s1 mod c6;
b5:=s1 div c5; s1:=s1 mod c5;
b4:=s1 div c4; s1:=s1 mod c4;
b3:=s1 div c3; s1:=s1 mod c3;
b2:=s1 div c2; s1:=s1 mod c2;
b1:=s1 div c1; s1:=s1 mod c1;
WriteLn(s,' lei in bancnote:');
if b1>0then Writeln(c1:5,'  - ',b1:5);
if b2>0then Writeln(c2:5,'  - ',b2:5);
if b3>0then Writeln(c3:5,'  - ',b3:5);
if b4>0then Writeln(c4:5,'  - ',b4:5);
if b5>0then Writeln(c5:5,'  - ',b5:5);
if b6>0then Writeln(c6:5,'  - ',b6:5);
if b7>0then Writeln(c7:5,'  - ',b7:5);
if b8>0then Writeln(c8:5,'  - ',b8:5);
if b9>0then Writeln(c9:5,'  - ',b9:5);
ReadLn;
end.
