HOC24
Lớp học
Môn học
Chủ đề / Chương
Bài học
var a:array[1..1000] of integer;
i,n,min:integer;
begin
write('n = ');readln(n);
for i:=1 to n do
write('Nhap so thu ',i,' = ');readln(a[i]);
end;
min:=a[1];
for i:=2 to n do
if min > a[i] then min:=a[i];
write('So nho nhat la ',min);
readln
end.
- Mở Windows Explorer (hoặc File Explorer).
- Mở thư mục lưu bài.
- Chọn bài cần xóa.
- Nhấn phím Delete.
Trong Word 2010
- Chọn thẻ lệnh Home.
- Chọn lệnh Replace.
- Nhập từ "dưa hấu" vào ô Find what.
- Nhập từ "xoài" vào ô Replace with.
- Chọn lệnh Replace để thay thế 1 từ (hoặc chọn Replace All để thay thế tất cả).
- Chọn lệnh Close để ngừng thay thế và thoát khỏi hộp thoại Find and Replace.
Có khai báo gì đâu em?
Tổng của các số như thế nào em?
a) var a:array[1..1000] of integer;
i,k:integer;
p:longint;
write('k = ');readln(k);
p:=1;
for i:=1 to k do
if a[i]<30 then p:=p*a[i];
write('Tich la ',p);
b)
s:longint;
if a[i]<100 then s:=s+a[i];
write('Tong la ',s);
kiểm tra số dương là sao em? em ghi cụ thể chính xác lại giùm!
var a,b,c:integer;
write('a = ');readln(a);
write('b = ');readln(b);
write('c = ');readln(c);
if (a+b>c) and (a+c>b) and (b+c>a) then
write('ba so do co the la do dai ba canh cua tam giac')
else write('ba so do khong the la do dai ba canh cua tam giac');
Lỗi: "program tinh_a_mu_ng" sửa lại: program tinh_a_mu_ng;
Lỗi: gia tri sửa lại: giatri
Lỗi: readin(n) sửa lại: readln(n);
Lỗi: i:=1 sửa lại: i:=1;
Lỗi: while i < n do sửa lại: while i <= n do
Lỗi: i:=i+2 sửa lại: i:=i+1;
Lỗi: writeln('a mu n bang : ", giatri); sửa lại: writeln('a mu n bang : ', giatri);
var a:array[1..1000] of real;
i,n:integer;
s:real;
write('Nhap phan tu thu ',i,' = ');readln(a[i]);
s:=s+a[i];
write('tong la ',s:10:2);