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 s:string;
i,d,dem:integer;
begin
clrscr;
write('nhap xau S:'); readln(s);
d:=length(s);
dem:=0;
for i:=1 to d do
if st[i]='1' then inc(dem);
writeln(dem);
readln;
end.
Program HOC24;
var s: string;
i: byte;
begin
write('Nhap xau :'); readln(s);
for i:=1 to length(s) do if s[i]<>'a' then write(s[i]);
readln
end.
uses crt;
var st:string;
i,d:integer;
begin
clrscr;
write('Nhap xau:'); readln(st);
d:=length(st);
for i:=1 to d do
if st[i]='a' then delete(st,i,1);
writeln(st);
readln;
end.
uses crt;
const fi='vb.txt';
var f1:text;
st:string;
i,d:integer;
begin
clrscr;
assign(f1,fi); rewrite(f1);
readln(st);
d:=length(st);
for i:=1 to d do
if st[i] in ['A'..'Z'] then write(f1,st[i]:4);
close(f1);
readln;
end.
program bai1;
uses crt;
var i:integer;
s,s1:string;
begin
clrscr;
write('nhap S:');readln(s);
while pos('C',s)<>0 do
begin
insert('LOP11A',s,pos('C',s));
delete(s,pos('C',s),1);
end;
writeln('xau sau khi bien doi la: ',s);
writeln('do dai cua xau tren la: ',length(s));
write('nhap s1:');readln(s1);
if s1[1]=s[1] then writeln('ki tu dau cua hai xau trung nhau')
else writeln('ki tu dau cua hai xau khong trung nhau');
readln;
end.
program ki_tu;
uses crt;
var s: string;
d,i,n: integer;
begin
clrscr;
write('nhap xau s: ');readln(s);
n:= length(s);
s:=upcase(s);
write('xau s sau khi duoc in hoa la: ');
writeln(s);
d:=0;
for i:= 1 to n do
if s[i] = 'A' then d:= d+1 ;
writeln('chu cai A xuat hien ',d,' lan');
readln
end.
Uses crt;
Var st:string;
D,i,dem:integer;
Begin
Clrscr;
Write('nhap xau:'); readln(st);
D:=length(st);
Dem:=0;
For i:=1 to d do
If st[i]='A' then inc(dem);
Writeln(dem);
Readln;
End.
Program HOC24;
var S: string;
d,i: byte;
begin
write('S= '); readln(s);
For i:= length(s) downto 1 do write(s[i]);
writeln;
while s[length(s)]=#32 do delete(s,length(s),1);
while pos(#32#32,s)<>0 do delete(s,pos(#32#32,s),1);
while s[1]=#32 do delete(s,1,1);
d:=0;
for i:=1 to length(s) do d:=d+1;
write('So tu :',d);
readln
end.
uses crt;
var s:string[200];
i,d,dem:integer;
begin
clrscr;
write('Nhap xau:'); readln(s);
d:=length(s);
write('Xau viet theo chieu nguoc la: ');
for i:=d downto 1 do
write(st[i]);
writeln;
dem:=0;
for i:=1 to d do
if st[i]=#32 then inc(dem);
writeln('So tu la: ',dem);
readln;
end.
string = input("Nhập vào một xâu kí tự: ")
count = string.count('tiền')
print('Xâu kí tự có ', count, 'từ "tiền"')