//for delphi security install package
[Fatal Error] Required package 'madSecurity_' not foundlearn procedure
procedure PrintAll(redn,yeln,whin:integer;sumn:integer);
var i,j,k:integer; var leftn:integer; var red,yel,whi:integer; begin for i:=1 to redn do begin leftn:=sumn-i; if(leftn < 0) then break else red := i; if( leftn =0 ) then begin writeln('r y w:',red, leftn,leftn); continue; end else for j:=0 to yeln do begin leftn := sumn-i-j; if(leftn < 0) then break else yel:= j; beginif( leftn =0 ) then
begin writeln('r y w:',red,yel,leftn); continue; end else if(leftn <= whin) then writeln('r y w ',red,yel,leftn); end end end end;PrintAll(4,5,3,4);