0
0
Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
2377
1794
uses crt;
var i,n,d:longint; a:array[1..10000000]of longint;
begin
clrscr;
write('Nhap so luong phan tu: ');readln(n);
for i:=1 to n do
begin
write('Phan tu thu ',i,': ');readln(a[i]);
if a[i]<0 then inc(d);
end;
if d=0 then writeln('0') else
begin
write('Cac so am co trong mang: ');
for i:=1 to n do if a[i]<0 then write(a[i],' '); writeln;
write('Vi tri cac so am co trong mang: ');
for i:=1 to n do if a[i]<0 then write(i,' '); writeln;
end;
readln
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
2288
1724
uses crt;
var a:array[1..1000000] of int64;
n,i,d:longint;
begin
clrscr;
write('Nhap so luong phan tu: '); readln(n);
for i:=1 to n do begin
write('Nhap phan tu thu ',i,': '); readln(a[i]);
if a[i] < 0 then inc(d);
end;
if d = 0 then writeln('0')
else begin
write('Cac so am: ');
for i:=1 to n do write(a[i],' '); writeln;
write('Vi tri cac so am: ');
for i:=1 to n do write(i,' ');
end;
readln;
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin
182
39
118
em gửi a 5*+cảm ơn ạ 😀😀
2377
47178
1794
ò, chào em
182
39
118
vâng ạ