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.
var lan,ha,mai:integer;
begin
write('Tuoi Lan la ');readln(lan);
write('Tuoi Ha la ');readln(ha);
write('Tuoi Mai la ');readln(mai);
write('Tong so tuoi cua ba ban la ',lan+ha+mai);
readln;
end.
program TongSoChanTrongDay;
var
n, i, tong: integer;
a: array[1..100] of integer;
begin
tong := 0;
write('Nhap so phan tu cua day: ');
readln(n);
for i := 1 to n do
begin
write('Nhap phan tu thu ', i, ': ');
readln(a[i]);
if a[i] mod 2 = 0 then
tong := tong + a[i];
end;
writeln('Tong cac phan tu chan trong day la: ', tong);
readln;
end.
Tk
Program Can_nang;
Uses Crt;
Var W,h,BMI: Real;
Begin
Clrscr;
Writeln('Nhap can nang');Readln(W);
Writeln('Nhap chieu cao');Readln(h);
BMI:= W/h*h ;
Writeln(' Chi so khoi cua co the la', BMI:0:1);
If (BMI >=25) then Write(' Ban map roi do nhe');
If (18.5<=BMI) and (BMI<25) then Write(' Ban phat trien binh thuong') ;
If (BMI< 25) then Write(' Ban phat trien cham roi') ;
Readln;
end.
a) read(canang)
b) write(x + y + z)
c) write("chuc cac ban thi tot")
program BaiTap;
var
A: array[1..150] of integer;
N, i, sum: integer;
begin
write('Nhap so phan tu cua day A (N <= 150): ');
readln(N);
for i := 1 to N do
begin
write('Nhap phan tu thu ', i, ': ');
readln(A[i]);
end;
writeln('Day so vua nhap la:');
for i := 1 to N do
write(A[i], ' ');
writeln;
sum := 0;
for i := 1 to N do
if A[i] mod 2 = 0 then
sum := sum + A[i];
writeln('Tong cac phan tu chan trong day la: ', sum);
readln;
end.
uses crt;
var a,b:integer;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
writeln('Hieu cua hai so la: ',a-b);
readln;
end.