HOC24
Lớp học
Môn học
Chủ đề / Chương
Bài học
s e a n, dài quá mình lười lắm bạn à :v
Parallel about develop society, our environment is becoming bad to worse. In old times, people lived in a fresh environment so they can live so strong until die. But now, people always have many sick from mild to heavy. Do you think why? Because many people were lost sense of protection, littering indiscriminately, deforestation too much,... Don't get too late, right now we can grow more trees, punish acts polluting the environment,...Let's live more meaning
Cú pháp câu lệnh lặp xác định:
For <biến đếm>:=<giá trị đầu> to <giá trị cuối>;
Cú pháp câu lệnh lặp không xác định:
While <điều kiện> do <câu lệnh>;
Câu 4: Uses crt;
Var a:array[1..100] of integer; n,i,dem,tong:integer;
begin
dem:=1; tong:=0;
writeln('Nhap so nguyen can nhap cua mang');readln(n);
For i:=1 to n do begin
writeln('A[',i,'] la');readln(a[i]);
If a[i] mod 2 =0 then dem:=dem+1;
tong:=tong+a[i]; end;
writeln('so chan trong day la',dem);
writeln('tong cua day la',tong);
readln
end.
A:=A+(i*2-1) là sai rồi nhé
sau vòng for dùng if i mod 2 <>0 hay if i mod 2 =1
rồi then A:=A+i;
\(2H_2O\rightarrow O_2+2H_2\)
Có anh chị nào thi IOE nhiều cho em xin kinh nghiệm với ạ :))) Nên ôn gì mọi người nhỉ? Đối với em cái đề nó rất mở ôn chẳng trúng bao giờ.