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.
![](https://rs.olm.vn/images/avt/0.png?1311)
Cách 1: Có sử dụng chương trình con
uses crt;
var st:string;
{------------chuong-trinh-con-------------------}
function doi(st1:string):string;
var i,d:integer;
begin
d:=length(st1);
for i:=1 to d do
st1[i]:=upcase(st1[i]);
doi:=st1;
end;
{-------------------chuong-trinh-chinh--------------------}
begin
clrscr;
write('Nhap xau:'); readln(st);
writeln(doi(st));
readln;
end.
Cách 2: Không sử dụng chương trình con
uses crt;
var st:string;
i,d:integer;
begin
clrscr;
write('Nhap xau:'); readln(st);
d:=length(st);
for i:=1 to d do
st[i]:=upcase(st[i]);
writeln(st);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
*Cách có sử dụng chương trình con:
uses crt;
var st:string;
{--------------chuong-trinh-con---------------}
function doixau(st:string):string;
var i,d:integer;
begin
d:=length(st);
for i:=1 to d do
st[i]:=upcase(st[i]);
doixau:=st;
end;
{-------------chuong-trinh-chinh---------------}
begin
clrscr;
write('Nhap xau:'); readln(st);
writeln('Xau doi sang chu hoa la: ',doixau(st));
readln;
end.
*Cách không sử dụng chương trình con:
uses crt;
var st:string;
i,d:integer;
begin
clrscr;
write('Nhap xau:'); readln(st);
d:=length(st);
for i:=1 to d do
st[i]:=upcase(st[i]);
writeln('Xau sau khi doi la: ',st);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
Program HOC24;
var i.n: integer;
a: array[1..250] of integer;
begin
for i:=1 to n do
begin
write('Nhap diem toan cua ban thu ',i,': '); readln(a[i]);
end;
for i:=1 to n do write(a[i],' ');
readln
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var st:string;
d,i:integer;
begin
clrscr;
write('Nhap xau:'); readln(st);
d:=length(st);
for i:=1 to d do
if not(st[i] in ['a'..'z']) and not(st[i] in ['A'..'Z']) then write(st[i]);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var s:string;
d,i:integer;
begin
clrscr;
write('Nhap xau S:'); readln(s);
d:=length(s);
for i:=1 to d do
if not(s[i] in ['0'..'9']) then write(s[i]);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var a,b:integer;
begin
clrscr;
readln(a,b);
if (a>0) and (b>0) then writeln(a*b)
else writeln('Nhap lai');
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
program HienThiA;
var
i: Integer;
begin
i := 1;
while i <= 10 do
begin
writeln('A');
i := i + 1;
end;
readln;
end.
pascal nhỉ?
uses crt;
var i:integer;
begin
clrscr;
for i:=1 to 20 do
begin
delay(50);
writeln('a');
end;
readln;
end.