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.