Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted by ALMAZA ( 16 years ago )
var a:array [1..20]of integer;
i,j,k:integer;
b:boolean;
  begin
   b:=false;
   k:=0;
   for i:=1 to 6 do
     begin
      a[i]:=random(20);
      write(a[i],' ');
     end;
   for i:=1 to 6 do
     for j:=i to 6 do
       begin
         if a[i]=a[j] then
           inc(k);
       end;
      if k>2 then
        begin
          k:=0;
          b:=true
        end;
     if b then write('no') 
     else write('yes');
  end.

 

Revise this Paste

Children: 25883
Your Name: Code Language: