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.
uses crt;
var diem:real;
begin
clrscr;
write('nhap diem:'); readln(diem);
if diem<5 then writeln('diem yeu ban can co gang hon')
else if (diem>=5) and (diem<6,5) then writeln('ban dat diem trung binh')
else if (diem>=6,5) and (diem<8) then writeln('ban dat diem kha')
else writeln('ban dat diem gioi');
readln;
end.
uses crt;
var diem:real;
begin
clrscr;
write('nhap diem:'); readln(diem);
if diem<5 then writeln('ban can co gang hon');
if (diem>=5) and (diem<6.5) then writeln('ban dat diem trung binh');
if (diem>=6.5) and (diem<8) then writeln('ban dat diem kha');
if diem>=8 then writeln('ban dat diem gioi');
readln;
end.
program DiemTB;
var
diemToan, diemVan, diemTB: real;
begin
write('Nhap diem mon Toan: ');
readln(diemToan);
write('Nhap diem mon Van: ');
readln(diemVan);
diemTB := (diemToan + diemVan) / 2;
writeln('Diem trung binh: ', diemTB:0:2);
if diemTB >= 5 then
writeln('Chuc mung! Ban da dau ky thi.')
else
writeln('Rat tiec! Ban da truot ky thi.');
readln;
end.
a)
uses crt;
var n,i,kt,j:integer;
begin
clrscr;
repeat
write('Nhap n='); readln(n);
until n>1;
writeln('Cac so nguyen to be hon hoac bang ',n,' la: ');
for i:=2 to n do
begin
kt:=0;
for j:=2 to i-1 do
if i mod j=0 then kt:=1;
if kt=0 then write(i:4);
end;
readln;
end.
uses crt;var n: longint; chrn: string; valn,sum,max,i,preperror: byte;begin write('Nhap so can kiem tra: '); readln(n); str(n,chrn); for i:=1 to length(chrn) do begin val(chrn[i],valn,preperror); sum:=sum+valn; if max<valn then max:=valn; valn:=0 end; writeln('Ket qua: '); writeln(length(chrn)); writeln(sum); write(max); readln;end.uses crt;var n: longint; chrn: string; valn,sum,max,i,preperror: byte;begin write('Nhap so can kiem tra: '); readln(n); str(n,chrn); for i:=1 to length(chrn) do begin val(chrn[i],valn,preperror); sum:=sum+valn; if max<valn then max:=valn; valn:=0 end; writeln('Ket qua: '); writeln(length(chrn)); writeln(sum); write(max); readln;end.
Program HOC24;
var N:longint;
max,tg,t,d: integer;
Begin
write('Nhap N : '); readln(N);
max:=0;
while n<>0 do
begin
tg:=n mod 10;
d:=d+1;
t:=t+tg;
if tg>max then max:=tg;
n:=n div 10;
end;
writeln('So nguyen N co ',d,' chu so');
writeln('Tong cac chu so cua N la : ',t);
write('Chu so lon nhat cua N la :',max);
readln
end.
var a:real;
begin
write('nhap diem kiem tra: '); readln(a);
if a<5 then writeln('Ban can co gang hon!');
if (a>=5) and (a<6.5) then writeln('Ban dat diem trung binh!');
if (a>=6.5) and (a<8) then writeln('Ban dat diem kha!');
if a>8 then write('Chuc mung,ban dat diem gioi!');
readln
end.