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.
#include <bits/stdc++.h>
using namespace std;
string st,d;
int main()
{
freopen("dkt.inp","r",stdin);
cin>>st;
d=st.length();
for (int i=0; i<=d-1; i++)
st[i]-=32;
cout<<st;
return 0;
}
uses crt;
var st:string[30];
i,d,dem,dem1:integer;
ktu:char;
begin
clrscr;
write('Nhap cau:'); readln(st);
d:=length(st);
while st[1]=#32 do
begin
delete(st,1,1);
d:=length(st);
end;
while st[length(st)]=#32 do
begin
delete(st,length(st),1);
end;
for i:=1 to length(st) do
if (st[i]=#32) and (st[i+1]=#32) then delete(st,i,1);
dem:=0;
for i:=1 to length(st) do
if st[i]=#32 then inc(dem);
writeln('So tu trong cau la: ',dem-1);
write('Nhap ki tu:'); readln(ktu);
dem1:=0;
for i:=1 to length(st) do
if (st[i]=#32) and (st[i+1]=ktu) then inc(dem1);
writeln('Trong cau co ',dem1,' tu bat dau bang ki tu ',ktu);
readln;
end.
const fi='xau.inp';
fo='xau.out';
var f1,f2:text;
a:array[1..100]of string;
i,d:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
n:=0;
while not eof(f1) do
begin
n:=n+1;
readln(f1,a[n]);
end;
for i:=1 to n do
begin
for j:=1 to length(a[i]) do
a[i][j]:=upcase(a[i][j]);
end;
for i:=1 to n do
writeln(f2,length(a[i]),' ',a[i]);
close(f1);
close(f2);
end.
Var st:string;
i,dem:integer;
Begin
Write('Nhap xau ky tu ');readln(st);
For i:=1 to length(st) do
If st[i] = 'a' then dem:=dem+1;
Write('So ky tu a co trong xau la ',dem);
Readln;
End.
uses crt;
var st:string;
i,d,dem:integer;
begin
clrscr;
readln(st);
d:=length(st);
dem:=0;
for i:=1 to d do
if st[i]=' ' then dem:=dem+1;
writeln(dem+1);
readln;
end.
tk
uses crt;
var st1:string;
i,d:integer;
begin
clrscr;
write('Nhap xau:'); readln(st1);
d:=length(st1);
for i:=1 to d do
if (st1[i]='a') and (st1[i+1]='b') and (st1[i+2]='c') then delete(st1,i,3);
writeln(st1);
readln;
end.