Những câu hỏi liên quan
Ngoc Huyen
Xem chi tiết
Minh Lệ
15 tháng 3 2021 lúc 19:11

Program HOC24;

var s,s1: string;

i: byte;

begin

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

writeln('Xau S= ',s);

write('Xau S1= ');

for i:=length(s)-3 to length(s) do write(s[i]);

readln

end.

Bình luận (0)
Nguyễn Chi
Xem chi tiết
Lê Đình Quý
Xem chi tiết
Minh Lệ
16 tháng 3 2023 lúc 22:07

Program HOC24;

var s1,s2: string;

i: byte;

begin

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

s1:=''

for i:= length(s) downto 1 do

if s[i] in ['A'..'Z'] then s1:=s1+s[i];

write('Xau S1 : ',s1);

readln

end.

Bình luận (0)
trần thu lan
Xem chi tiết
feng
Xem chi tiết
nguyễn an phát
24 tháng 5 2022 lúc 10:59

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.

Bình luận (0)
Nguyễn Thị Huyền Nhi
Xem chi tiết
NTKL
Xem chi tiết
Nguyễn Lê Phước Thịnh
18 tháng 1 2022 lúc 10:13

Bài 2: 

#include <bits/stdc++.h>

using namespace std;

string st;

int d;

int main()

{

getline(cin,st);

d=st.length();

cout<<d;

return 0;

}

Bình luận (0)
Kiều Vũ Linh
19 tháng 1 2022 lúc 8:59

Bài 1:

Var so,i,n,dem:integer;

Begin

Write('Nhap so luong so n = ');readln(n);

For i:=1 to n do

Begin

Write('Nhap so thu ',i);readln(so);

If so mod 2 = 0 then dem:=dem+1;

End;

Write('Co ',dem,' so chan');

Readln;

End.

Bài 2:

Var st:string;

Begin

Write('Nhap vao xau ki tu ');readln(st);

Write(' Xau vua nhap co do dai la ',length(st));

Readln;

End.

Bình luận (0)
Trần Thanh Trọng
Xem chi tiết
Nguyễn Lê Phước Thịnh
18 tháng 3 2021 lúc 22:39

uses crt;

var st:string;

d,i:integer;

begin

clrscr;

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

d:=length(st);

for i:=1 to d do 

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

readln;

end.

Bình luận (0)
Ngoc Huyen
Xem chi tiết
Minh Lệ
15 tháng 3 2021 lúc 19:07

Program HOC24;

var s: string;

i: byte;

begin

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

while pos('g',s)<>0 do

begin

insert('h',s,pos('g',s));

delete(s,pos('g',s),1);

end;

write('S= ',s);

readln

end.

Bình luận (0)