1 solutions

  • 0
    @ 2025-11-5 17:33:04

    Pascal :

    var s,i,j,n,h,t:integer;
     a:array[1..100] of integer;
    begin
    readln(n);
    
    for i:=1 to  n do
     read(a[i]);
    
     for i:=1 to n do
       for j:= i+1 to n do
        if a[i]<a[j] then
      begin
      t:=a[i];
      a[i]:=a[j];
      a[j]:=t;
      end;
     for i:= 1 to 5 do
      if i=1 then write(a[i]) else write(' ',a[i]);
    end.
    
    • 1

    Information

    ID
    18549
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    (None)
    # Submissions
    0
    Accepted
    0
    Uploaded By