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.
program ChuyenXauSangChuThuong;
var
str: string;
i: integer;
begin
write('Nhap mot xau ky tu: ');
readln(str);
for i := 1 to Length(str) do
str[i] := LowerCase(str[i]);
writeln('Xau ky tu chuyen thanh chu thuong la: ', str);
end.
Program HOC24;
var s,st: string;
i,n,max: integer;
a: array[1..1000] of string;
begin
write('Nhap xau: '); readln(s);
s:=s+' '; n:=1;
while length(s)<>0 do
begin
n:=n+1;
a[n]:=copy(s,1,pos(' ',s));
delete(s,1,pos(' ',s));
end;
max:=length(a[1]);
for i:=2 to n do if max<length(a[i]) then
begin
max:=length(a[i]);
st:=a[i];
end;
write('Tu co do dai lon nhat trong xau la: ',st);
readln
end.
var s,st: string;
i,n,max: integer;
a: array[1..1000] of string;
begin
write('Nhap xau: '); readln(s);
s:=s+' '; n:=1;
while length(s)<>0 do
begin
n:=n+1;
a[n]:=copy(s,1,pos(' ',s));
delete(s,1,pos(' ',s));
end;
max:=length(a[1]);
for i:=2 to n do if max<length(a[i]) then
begin
max:=length(a[i]);
st:=a[i];
end;
write('Tu co do dai lon nhat trong xau la: ',st);
readln
end.
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.
#include <bits/stdc++.h>
using namespace std;
string a[1000],t,ln;
int n,i;
int main()
{
cin>>n;
for (i=1;i<=n; i++) cin>>a[i];
ln='';
for (i=1; i<=n; i++) if (ln<a[i]) ln=a[i];
t='';
for (i=1; i<=n; i++) t=t+a[i];
cout<<ln<<" "<<t;
return 0;
}
#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;
}