Bạn chưa đăng nhập. Vui lòng đăng nhập để hỏi bài

Những câu hỏi liên quan
thân lê tú anh
Xem chi tiết
Họ Và Tên
Xem chi tiết
Nguyễn Lê Phước Thịnh
12 tháng 1 2021 lúc 21:16

uses crt;

var s:string;

i,d,dem:integer;

begin 

clrscr;

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

d:=length(s);

writeln('Trong chuoi ',s,' co ',d,' ki tu');

writeln('Chuoi dao cua chuoi ',s,' la: ');

for i:=d downto 1 do 

  write(s[i]:4);

writeln;

dem:=0;

for i:=1 to d do 

  if s[i] in ['0'..'9'] then inc(dem);

writeln('So chu so trong xau la: ',dem);

readln;

end. 

Phương Vũ Hà
Xem chi tiết
Nguyễn Lê Phước Thịnh
26 tháng 3 2021 lúc 16:05

uses crt;

var s:string;

i,d:integer;

begin

clrscr;

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

d:=length(s);

for i:=1 to d do 

  if (s[i] in ['a'..'z']) or (s[i] in ['A'..'Z']) then delete(s,i,1);

writeln('Xau sau khi xoa het ki tu chu la: ',s);

readln;

end.

Trần Thị Thúy Hằng
Xem chi tiết
Thangg PH
Xem chi tiết
Minh Lệ
3 tháng 4 2021 lúc 18:54

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.

Nguyễn Lê Phước Thịnh
3 tháng 4 2021 lúc 19:16

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.

phạm tú
Xem chi tiết
Nguyễn Lê Phước Thịnh
9 tháng 3 2023 lúc 14:29

#include <bits/stdc++.h>

using namespace std;

int main()

{

string st;

int d,i,dem=0;

getline(cin,st);

d=st.length();

for (int i=0; i<d; i++)

if (st[i]=' ') dem++;

cout<<dem+1;

return 0;

}

nguyễn linh
Xem chi tiết
Võ Thị Thái Ngọc
Xem chi tiết
Nguyễn khánh thành
Xem chi tiết