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.

11 tháng 1 2017

Đáp án B

uses crt;

var st:string;

i,d:integer;

begin

clrscr;

readln(st);

d:=length(st);

for i:=1 to d do

  if (st[i] in ['a'..'z']) or (st[i] in ['A'..'Z']) then write(st[i]);

writeln;

for i:=1 to d do 

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

readln;

end.

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') or (st[i]='A') then st[i]:='b';

writeln(st);

readln;

end.

D
datcoder
CTVVIP
19 tháng 12 2023

Program HOC24;

var s: string;

i,x: byte;

begin

readln(s);

//-----------Câu a

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

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

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

writeln(s);

//-------------Câu b

s[1]:=upcase(s[1]);

for i:=1 to length(s) do

if s[i]=#32 upcase(s[i+1]);

writeln(s);

//--------------Câu c

for i:=1 to length(s) do

if s[i]=#32 then x:=i;

for i:=x+1 to length(s) do

write(s[i]);

//---------------------------

readln

end.

20 tháng 8 2021

ai đó giúp mình với nhanh lên

 

20 tháng 8 2021

thêm test đây nha:

Dữ liệu : Vào từ từ tệp Suaxau.Inp chứa xâu cần sửa. 

Kết quả:  Ghi vào tệp Suaxau.out xâu đã sửa. 

Ví dụ: 

Suaxau.INP

   Suaxau.OUT

Ta#oi thi hoc sinua#h###nh gioi tin hoj#c

     Toi thi hoc sinh gioi tin hoc

uses crt;

var s:string;

i,d,dem1,dem2,dem3,dem4:integer;

begin

clrscr;

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

d:=length(s);

dem1:=0;

dem2:=0;

dem3:=0;

dem4:=0;

for i:=1 to d do 

  begin

if st[i] in ['0'..'9'] then inc(dem1)

else if st[i] in ['a'..'z'] then inc(dem2)

else if st[i] in ['A'..'Z'] then inc(dem3)

else inc(dem4);

end;

writeln('So luong ky tu so la: ',dem1);

writeln('So luong ky tu thuong la: ',dem2);

writeln('So luong ky tu hoa la: ',dem3);

writeln('So luong ky tu dac biet la: ',dem4);

readln;

end.

27 tháng 3 2022

var s:string;

i:integer;

begin

write('Nhap xau ki tu S = ');readln(s);

for i:=1 to length(s) do

begin

if s[i] <> '0' then write('Vi tri cua so 0 cuoi cung la ',i-1);

i:=length(s);

end;

readln;

end.

1 tháng 9 2021

U

Ký tự tiếp theo trong dãy sau đây là ký tự nào: A , C , F , J , O , U