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.
program ChuyenXauSangChuThuong;
var
str: string;
i: integer;
begin
write('Nhap mot xau ky tu: ');
readln(str);
for i := 1 to Length(str) do
str[i] := LowerCase(str[i]);
writeln('Xau ky tu chuyen thanh chu thuong la: ', str);
end.
uses crt;
var a:array[1..100]of integer;
i,n,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
t:=0;
for i:=1 to n do
if a[i]>0 then t:=t+a[i];
writeln(t);
readln;
end.
var i,n:integer;
a:array[-1000..1000] of integer;
begin
for i:=1 to 5 do
read(a[i]);
for i:=1 to 5 do
if a[i]>0 then
write(a[i]);
readln;
end.
uses crt;
var a:array[1..5]of integer;
i,t:integer;
begin
clrscr;
for i:=1 to 5 do
begin
write('A[',i,']='); readln(a[i]);
end;
t:=0;
for i:=1 to 5 do
if a[i]>0 then t:=t+a[i];
writeln(t);
readln;
end.
uses crt;
var a:array[1..50]of integer;
i,n:integer;
begin
clrscr;
readln(n);
for i:=1 to n do
readln(a[i]);
for i:=1 to n do write(a[i]:4);
readln;
end.
uses crt;
var a:array[1..50]of integer;
i,n:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
for i:=1 to n do write(a[i]:4);
readln;
end.
1. Uses crt;
var n,i: integer;
begin clrscr;
readln(n);
for i:=1 to n do write(i:3);
readln;
end.
2. Uses crt;
var n,i: integer;
begin clrscr;
readln(n);
for i:=1 to n do if(i mod 2 = 0) then write(i:3);
readln;
end.
program doc_so;
var
so, chuc, donvi: integer;
begin
write('Nhap vao mot so nguyen duong co 2 chu so: ');
readln(so);
if (so < 10) or (so > 99) then
writeln('So khong hop le')
else
begin
chuc := so div 10;
donvi := so mod 10;
case chuc of
1:
case donvi of
0: writeln('Muoi');
1: writeln('Muoi mot');
2: writeln('Muoi hai');
3: writeln('Muoi ba');
4: writeln('Muoi bon');
5: writeln('Muoi lam');
6: writeln('Muoi sau');
7: writeln('Muoi bay');
8: writeln('Muoi tam');
9: writeln('Muoi chin');
end;
2: write('Hai muoi');
3: write('Ba muoi');
4: write('Bon muoi');
5: write('Nam muoi');
6: write('Sau muoi');
7: write('Bay muoi');
8: write('Tam muoi');
9: write('Chin muoi');
end;
if (chuc <> 1) and (donvi > 0) then
begin
write(' ');
case donvi of
1: writeln('mot');
2: writeln('hai');
3: writeln('ba');
4: writeln('bon');
5: writeln('nam');
6: writeln('sau');
7: writeln('bay');
8: writeln('tam');
9: writeln('chin');
end;
end;
end;
readln;
end.
program Doc_so;
var
n: integer;
begin
write('Nhap mot so nguyen duong to da 2 chu so: ');
readln(n);
if n < 10 then
writeln('So ', n, ' doc la: muoi ', n)
else if (n >= 10) and (n < 20) then
writeln('So ', n, ' doc la: muoi ', n mod 10)
else if (n >= 20) and (n < 100) then
begin
case n div 10 of
2: write('Hai');
3: write('Ba');
4: write('Bon');
5: write('Nam');
6: write('Sau');
7: write('Bay');
8: write('Tam');
9: write('Chin');
end;
write(' muoi ');
case n mod 10 of
1: writeln('mot');
2: writeln('hai');
3: writeln('ba');
4: writeln('bon');
5: writeln('lam');
6: writeln('sau');
7: writeln('bay');
8: writeln('tam');
9: writeln('chin');
end;
end
else
writeln('Khong nhap dung gia tri so nguyen duong to da 2 chu so.');
end.