TL

undefined

ai giúp mình với ạ

 

NT
15 tháng 5 2021 lúc 18:49

Câu 1: 

uses crt;

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

i,n: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 do

write(a[i]:4);

readln;

end.

Bình luận (0)
NT
15 tháng 5 2021 lúc 18:50

Câu 2: 

uses crt;

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

i,n: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 do 

  if a[i] mod 2=0 then write(a[i]:4);

readln;

end.

Bình luận (0)
NT
15 tháng 5 2021 lúc 18:51

Câu 3: 

uses crt;

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

i,n: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 do 

if a[i] mod 2<>0 then write(a[i]:4);

readln;

end.

Bình luận (0)
NT
15 tháng 5 2021 lúc 18:51

Câu 4: 

uses crt;

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

i,n,t:integer;

begin

clrscr;

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

for i:=1 to n do 

begin

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

end;

t:=0;

for i:=1 to n do 

 if a[i] mod 2=0 then t:=t+a[i];

writeln(t);

readln;

end.

Bình luận (0)
NT
15 tháng 5 2021 lúc 18:51

Câu 5: 

uses crt;

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

i,n,t:integer;

begin

clrscr;

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

for i:=1 to n do 

begin

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

end;

t:=0;

for i:=1 to n do 

if a[i] mod 2<>0 then t:=t+a[i];

writeln(t);

readln;

end.

Bình luận (0)
NT
15 tháng 5 2021 lúc 18:52

Câu 6: 

uses crt;

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

i,n,dem:integer;

begin

clrscr;

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

for i:=1 to n do 

begin

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

end;

dem:=0;

for i:=1 to n do 

  if a[i] mod 2=0 then inc(dem);

writeln(dem);

readln;

end.

Bình luận (0)

Các câu hỏi tương tự
IJ
Xem chi tiết
H24
Xem chi tiết
H24
Xem chi tiết
ML
Xem chi tiết
H24
Xem chi tiết
TA
Xem chi tiết
HT
Xem chi tiết
H24
Xem chi tiết
1N
Xem chi tiết