K
Khách

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.

26 tháng 4 2017

- Bôi đen các phần tử của mảng chọn biểu tượng Lệnh A đến Z trong Excel sắp xếp từ A đến Z hoặc từ số nhỏ nhất đến số lớn nhất

-Chọn ô tiêu đè có chứa dữ liệu

- Chọn Data - Filter - Auto Filter, chọn mũi tên cạnh ô tiêu đề chứa dữ liệu cần lọc

28 tháng 5 2017

program mang_2_chieu;

uses crt;

var m,n,i,j,t,k:word;

max,max2:longint;

a:array[1..100,1..100] of longint;

begin

clrscr;

write('nhap m:');readln(m);

write('nhap n:');readln(n);

writeln('nhap mang A:');

for i:=1 to m do

for j:=1 to n do

begin

write('a[',i,',',j,']=');readln(a[i,j]);

end;

writeln('mang da nhap :');

for i:=1 to m do

begin

for j:=1 to n do write(a[i,j]:3);

writeln;

end;

for i:=1 to m do

begin

for j:=1 to n-1 do

for t:=j+1 to n do

if(a[i,j]>a[i,t]) then

begin

k:=a[i,j];

a[i,j]:=a[i,t];

a[i,t]:=k;

end;

end;

writeln('mang da sap xep cac phan tu theo thu tu tang dan cua moi hang la:');

for i:=1 to m do

begin

for j:=1 to n do write(a[i,j]:3);

writeln;

end;

max:=a[1,1]; max2:=a[1,1];

for i:=1 to m do

for j:=1 to n do

if a[i,j]>max then max:=a[i,j];

for i:=1 to m do

for j:=1 to n do

if (a[i,j]<max) and (a[i,j]>max2) then max2:=a[i,j];

writeln('so lon nhat la:',max);

write('so lon nhi la:',max2);

readln;

end.banh

Bài 1: 

uses crt;

var a:array[1..100]of integer;

i,n,tam,j:integer;

begin

clrscr;

write('Nhap n='); readln(n);

for i:=1 to n do 

begin

write('A[',i,']='); readln(a[i]);

end;

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 

  write(a[i]:4);

readln;

end.

19 tháng 3 2021

Làm giúp em câu 2 với ạ

25 tháng 4 2023

Var a:array[1..1000] of integer;

i,m,tam:integer;

Begin

Write('m = ');readln(m);

For i:=1 to m do

Begin

Write('Nhap so thu ',i,' = ');readln(a[i]);

End;

For i:=1 to m do

If a[i] < a[i+1] then

Begin

tam:=a[i];

a[i]:=a[i+1];

a[i+1]:=tam;

End;

Write('Mang sau khi sap xep: ');

For i:=1 to m do

Write(a[i]:8);

Readln;

End.

5 tháng 1 2023

uses crt;

var n,i,s,t,j,max:longint;a,b:array[1..100] of longint;tbc:real;

function snt(n:longint):boolean;

var j:longint;

begin

for j:=2 to trunc(sqrt(n)) do

if n mod j=0 then exit(false);

exit(n>1);

end;

begin

readln(N);

for i:=1 to n do

begin

read (a[i]);

if snt(a[i])=true then 

begin

j:=j+1;

b[j]:=a[i];

end;

end;

t:=b[1];

max:=b[1];

for i:=2 to j do

begin

if b[i]>max then max:=b[i];

t:=t+b[i];

write(b[i]:4);

end;

tbc:=t/j;

writeln(S);

writeln(tbc);

writeln(max);

readln;

end.

 

 

 

uses crt;

var a:array[1..100]of integer;

i,n,min,tam,j:integer;

begin

clrscr;

n:=100;

for i:=1 to 100 do 

  begin

write('A[',i,']='); readln(a[i]);

end;

min:=a[1];

for i:=1 to n do

if min>a[i] then min:=a[i];

writeln('Gia tri nho nhat la: ',min);

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;

writeln('Day so tang dan la: ');

for i:=1 to n do 

  write(a[i]:4);

readln;

end.

uses crt;

var a:array[1..100]of integer;

i,n,max,tam,j:integer;

begin

clrscr;

n:=100;

for i:=1 to n do 

  begin

write('A[',i,']='); readln(a[i]);

end;

max:=a[1];

for i:=1 to n do  

if max<a[i] then max:=a[i];

writeln('Gia tri lon nhat la: ',max);

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;

writeln('Day so giam dan la: ');

for i:=1 to n do 

  write(a[i]:4);

readln;

end.

26 tháng 4 2019

Lời giải :

program hotrotinhoc ;

var a: array[1..32000] of integer;

i,n,j,max,tg : integer;

begin

write('n='); readln(n);

writeln('Nhap gia tri cua cac phan tu');

for i:= 1 to n do

begin

write('a[',i,']='); readln(a[i]);

end;

max:=a[1];

for i:=1 to n do

if a[i]>max then max:=a[i];

write('So lon nhat cua mang la :',max);

writeln;

for i:= 1 to n-1 do

for j:=1 to n do

if a[i]>a[j] then

begin

tg:=a[i];

a[i]:=a[j];

a[j]:=tg;

end;

writeln('Mang sau khi sap xep theo thu tu tang dan la :');

for i:= 1 to n do write(a[i]:6);

readln

end.

8 tháng 5 2019

bạn ơi,nếu viết theo gt tăng dần thì mik làm ren

 

 

13 tháng 5 2022

tham khảo:

uses crt;

var n,i:integer;

a:array[1..100] of integer;

begin

clrscr;

write(‘nhap so phan tu cua day:’);readln(n);

for i:=1 to n do

begin

write(‘a[‘,i,’]=’);readln(a[i]);

end;

writeln(‘day so da nhap:’);

for i:=1 to n do write(a[i]:2);

readln;

end.

13 tháng 5 2022

tham khảo

uses crt;

var n,i:integer;

a:array[1..100] of integer;

begin

clrscr;

write(‘nhap so phan tu cua day:’);readln(n);

for i:=1 to n do

begin

write(‘a[‘,i,’]=’);readln(a[i]);

end;

writeln(‘day so da nhap:’);

for i:=1 to n do write(a[i]:2);

readln;

end.