K
Khách

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 st:string;

i,d:integer;

begin

clrscr;

readln(st);

d:=length(st);

for i:=1 to d do 

  if (st[i]<>'a') and (st[i]<>'A') then write(st[i]);

readln;

end.

uses crt;

var s:string;

i,d,dem:integer;

begin

clrscr;

write('Nhap xau S:'); readln(s);

d:=length(s);

writeln('Cac ki tu so co trong xau S:'); 

dem:=0;

for i:=1 to d do 

  if s[i] in ['0'..'9'] then

begin

write(s[i]:4);

inc(dem);

end;

writeln;

writeln('So ki tu chu so co trong xau S: ',dem);

for i:=1 to d do 

  if s[i] in ['0'..'9'] then s[i]:='A';

writeln('Xau sau khi doi la: ',s);

readln;

end.

Bài 3: 

uses crt;

const fi='teptong.txt';

var a,b:integer;

f1:text;

begin

clrscr;

assign(f1,fi); rewrite(f1);

readln(a,b);

writeln(a+b);

writeln(f1,a+b);

close(f1);

readln;

end.

28 tháng 4 2021

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='dulieu.txt';

var f1:text;

st:string;

i,d:integer;

begin

clrscr;

assign(f1,fi); rewrite(f1);

write('Nhap xau:'); readln(st);

d:=length(st);

for i:=1 to d do 

if (st[i] in ['A'..Z']) or (st[i] in ['0'..'9']) or (st[i]=#32) then write(f1,st[i]);

close(f1);

end.

7 tháng 3 2021

Giải giúp mk vói🥰

uses crt;

const fi='dulieu.txt';

var f1:text;

st:string;

i,d:integer;

begin

clrscr;

assign(f1,fi); rewrite(f1);

write('Nhap xau:'); readln(st);

d:=length(st);

for i:=1 to d do 

if (st[i] in ['A'..Z']) or (st[i] in ['0'..'9']) or (st[i]=#32) then write(f1,st[i]);

close(f1);

end.

26 tháng 2 2021

Bài 1:

Program HOC24;

var s: string;

i: byte;

begin

write('Nhap xau : '); readln(s);

while s[1]=#32 do delete(s,1,1);

while pos(#32#32,s)<>0 do delete(s,pos(#32#32,s),1);

while s[length(s)]=#32 do delete(s,length(s),1);

for i:=1 to length(s) do

if s[i]=#32 then writeln(s[i]) else write(s[i]);

writeln;

readln

end.

Bài 2:

Program HOC24;

var s: string;

i: byte;

begin

write('Nhap xau : '); readln(s);

while s[1]=#32 do delete(s,1,1);

while pos(#32,s)<>0 do delete(s,pos(#32,s),1);

while s[length(s)]=#32 do delete(s,length(s),1);

writeln('Xau sau khi xoa ki tu trong: ',s);

readln

end.

26 tháng 2 2021

Bài 3:

Program HOC24;

var s: string;

i: byte;

begin

write('Nhap xau : '); readln(s);

for i:=1 to length(s) do s[i]:=upcase(s[i]);

write('Xau sau khi in hoa : ',s);

readln

end.

Bài 4:

Program HOC24;

var s: string;

i: byte;

begin

write('Nhap xau : '); readln(s);

write('Xau sau khi dao nguoc: ');

for i:=length(s) downto 1 do write(s[i]);

readln

end.