1, Viết chương trình nhập vào 1 số kiểm tra số đó là âm hay dương
2, Viết chương trình nhập vào họ tên học sinh , điểm trung bình hs. In trên màn hình kết quả "đậu" hay "rớt" của 1 hs. Nếu ĐTB ? 5 là rớt
Giúp vời mấy bạn ơi chiều mik kiểm tra. Cảm ơn mấy bn.
Nguyễn Lê Phước Thịnh Sara Trang Phạm Hoàng Lê Nguyên
program amduong;
var n:int64;
begin
readln(n);
if n<0 then write('am') else if n>0 then write('duong') else write('khong phai so am cung khong phai so duong');
readln;
end.
program diem;
var st,s:ansistring;i,j:longint;n:real;
begin
readln(st);
for i:=1 to length(st) do if st[i] in ['0'..'9'] then
begin
for j:=i to length(st) do s:=s+st[j];
val(s,n);
if n>5 then write('dau') else write('rot');
break;
end;
readln;
end.