0
0
Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
Program NN;
Uses crt;
Var A: array[1..100] of longint;
n,i,j,tg: longint;
Begin
Clrscr;
Write('Nhap n: '); Readln(n);
For i:=1 to n do
Read(A[i]);
For i:=1 to n-1 do
For j:=i+1 to n do
If A[i]<A[j] then
Begin
tg:=A[i];
A[i]:=A[j];
A[j]:=tg;
End;
For i:=1 to n do
If (A[i] mod 5 = 0) and (A[i] mod 2 <> 0) then Write(A[i],' ');
Writeln;
For i:=1 to n do
If (A[i] mod 2 = 0) then Write(A[i],' ');
Readln
End.
Hãy giúp mọi người biết câu trả lời này thế nào?
34
15
var a:array[1..30] of longint;
i,n,tam,j:longint;
begin
readln(n); {nhập số lượng phần tử}
for i:=1 to n do readln(a[i]);{nhập các phần tử theo hàng dọc}
for i:=1 to n-1 do
for j:=i+1 to n do
if a[i]<a[j] then
begin
tam:=a[i];
a[i]:=a[j];
a[j]:=tam;
end;
for i:=1 to n do
if (a[i] mod 5=0) and (a[i] mod 2=1) then
write(a[i],' ');writeln;
for i:=1 to n do
if a[i] mod 2=0 then write(a[i],' ');writeln;
readln
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
0
0
cảm ơn bạn nhiều ạ
34
15
không có j nha!
Bảng tin
0
32
0
Cảm ơn bạn nhiều nhaaa <3