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;

n,vt,d,i:integer;

begin

clrscr;

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

d:=length(st);

write('Nhap vi tri can xoa:'); readln(vt);

write('Nhap so ki tu can xoa:'); readln(n);

delete(st,vt,n);

writeln('Xau sau khi xoa la: ',st);

readln;

end.

uses crt;

var st:string;

d,i:integer;

begin

clrscr;

readln(st);

d:=length(st);

for i:=1 to d do 

  if not (st[i] in ['0'..'9']) then write(st[i]);

readln;

end.

Câu 1: 

uses crt;

var st:string;

d,i,dem:integer;

begin

clrscr;

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

d:=length(st);

write('Xau sau khi xoa so la: ');

for i:=1 to d do 

  if not(st[i] in ['0'..'9']) then write(st[i]);

writeln;

dem:=0;

for i:=1 to d do 

  if st[i]=#32 then inc(dem);

writeln('Xau co ',dem,' dau cach');

writeln('Do dai cua xau la: ',d);

readln;

end. 

Câu 2: 

uses crt;

const fi='kq.out';

var st1,st2:string;

f1:text;

begin

clrscr;

write('Nhap xau thu 1:'); readln(st1);

write('Nhap xau thu 2:'); readln(st2);

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

if length(st2)>length(st1) then writeln(f1,st2)

else writeln(f1,st1);

close(f1);

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.

Bài 1:

uses crt;

var S:String;

vt:integer;

begin

clrscr;

Write(‘Nhap 1 xau:’); Readln(S);

While pos(‘nang’,s)>0 do

Begin

Vt:= pos(‘nang’,s);

Delete(s,vt,4);

Insert(‘mua’,s ,vt);

End;

Writeln(‘Xau sau khi thay the ’,s);

Readln;

End.

Bài 2: 

uses crt;

var st:string;

d,i,kt:integer;

begin

clrscr;

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

d:=length(st);

kt:=0;

for i:=1 to d do 

  if st[i]<>st[d-i+1] then kt:=1;

if kt=0 then writeln(st,' la xau doi xung')

else writeln(st,' khong la xau doi xung');

readln;

end.

uses crt;

var st:string;

i,dem:integer;

begin

clrscr;

readln(st);

writeln(length(st));

for i:=5 to 8 do write(st[i]);

writeln;

dem:=0;

for i:=1 to length(st) do 

  if st[i]='b' then dem:=dem+1;

writeln(dem);

readln;

end.

16 tháng 3 2021

uses crt;

var st:string;

i,d:integer;

begin

clrscr;

readln(st);

d:=length(st);

for i:=1 to d do 

begin  

if st[i]=' ' then writeln

else write(st[i]);

end;

readln;

end.

16 tháng 3 2022

Uầy đỉnh thế

16 tháng 3 2023

Program Xau;

Uses crt;

Var St: String;

    i: longint;

Begin

        Clrscr;

        Write('Nhap xau: '); Readln(St);

        For i:=1 to length(St) do

                St[i] := Upcase(St[i]);

        Write('St = ',St);

        Readln

End.