Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.

#include <bits/stdc++.h>
using namespace std;
long long a[3],i,n;
int main()
{
n=3;
for (i=1; i<=n; i++) cin>>a[i];
sort(a+1,a+n+1);
for (i=1; i<=n; i++) cout<<a[i]<<" ";
return 0;
}

đây chỉ là bài ví dụ cho bạn áp dụng nhé:
var i,j,k,n,m:longint; f1,f2:text; S,St:string; function ktsnt(n:qword):boolean; var k:qword; begin ktsnt:=false; k:=2; if n<2 then exit; if n=2 then ktsnt:=true; while k*k <= n do begin if n mod k = 0 then exit; inc(k); end; ktsnt:=true; end; {---------------------------------------------------------------} function daonguoc(n:qword):boolean; begin str(n,S);St:=''; for i:=length(S) downto 1 do St:=St+S[i]; val(St,k); if ktsnt(k) then daonguoc:=true else daonguoc:=false; end; {---------------------------------------------------------------} begin assign(f1,'daonguoc.inp');reset(f1); assign(f2,'daonguoc.out');rewrite(f2); readln(f1,n,m); for j:=n to m do if daonguoc(j) then writeln(f2,j); close(f1);close(f2);end.

Bộ test số 2 số 7 ở sau số 789 sẽ tạo ra số lớn hơn nó nhưng sao lại để số 7 ở đầu tiên nhỉ. (789756119123)
sắp xếp lại mảng rồi in ra màn hình a[1]a[2]a[3]a[n] làdc

Bạn tham khảo code này nhé.
Uses crt;
Const fo = 'chenxau.out';
dau: array[1..3] of String[1]= ('','-','+');
s:array[1..9] of char=('1','2','3','4','5','6','7','8','9');
Var d:array[1..9] of String[1];
m:longInt;
f:text;
k:integer;
found:boolean;
Procedure Init;
Begin
Write('Cho M=');
Readln(m);
found:=false;
end;
Function tinh(s:string):longint;
Var i,t:longint;
code:integer;
Begin
i:=length(s);
While not(s[i] in ['-','+']) and (i>0) do dec(i);
val(copy(s,i+1,length(s)-i),t,code);
If i=0 then begin tinh:=t; exit; end
else
begin
delete(s,i,length(s)-i+1);
If s[i]='+' then tinh:=t+tinh(s);
If s[i]='-' then tinh:=tinh(s)-t;
end;
End;
Procedure Test(i:integer);
Var st:string; j:integer;
Begin
st:='';
For j:=1 to i do st:=st+d[j]+s[j];
If Tinh(st) = m then begin writeln(f,st); found:=true; end;
End;
Procedure Try(i:integer);
Var j:integer;
Begin
for j:=1 to 3 do
begin
d[i]:=dau[j]; Test(i);
If i<9 then try(i+1);
end;
End;
BEGIN
Clrscr;
Init;
Assign(f,fo);Rewrite(f);
for k:=1 to 2 do
begin
d[1]:=dau[k];
Try(2);
end;
If not found then write(f,'khong co ngiem');
Close(f);
END.
tách ra
tách cụng chả có ai trl đôu=))