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.

uses crt;
var s:string;
ktu:char;
i,d,dem:integer;
begin
clrscr;
write('Nhap xau:'); readln(s);
write('Nhap ki tu:'); readln(ktu);
d:=length(s);
dem:=0;
for i:=1 to d do
if s[i]=ktu then inc(dem);
writeln('So ki tu ',ktu,' trong xau ',s,' la: ',dem);
for i:=1 to d do
if s[i]=ktu then delete(s,i,1);
writeln('Xau sau khi xoa cac ki tu ',ktu,' la: ',s);
readln;
end.

#include <bits/stdc++.h>
using namespace std;
string s1;
int d,i;
int main()
{
getline(cin,s1);
d=s1.length();
for (i=0; i<=d-1; i++)
if ((s1[i]>=48) and (s1[i]<=57)) cout<<s1[i];
return 0;
}
1) Viet chuong trinh nhap xau S1, tao xau S2 bao gom tat ca cac ki tu da xoa het chu so trong xau S1

#include <bits/stdc++.h>
using namespace std;
string s1;
int d,i;
int main()
{
getline(cin,s1);
d=s1.length();
for (i=0; i<=d-1; i++)
if ((s1[i]<48) or (s1[i]>57)) cout<<s1[i];
return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
float a,b,s,d;
cin>>a>>b;
d=sqrt(a*a+b*b);
s=a*b;
cout<<"Do dai duong cheo la:"<<fixed<<setprecision(2)<<d<<endl;
cout<<"Dien tich la:"<<fixed<<setprecision(2)<<s;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int n;
double S;
cin >> n;
for(int i=1; i<=n; i++)
S+=1.0/i;
cout << double(S) << endl;
return 0;
}
Chúc bn học tốt!

Câu 1:
uses crt;
var b:array[1..100]of integer;
m,i:integer;
begin
clrscr;
write('nhap m='); readln(m);
for i:=1 to m do
begin
write('b[',i,']='); readln(b[i]);
end;
writeln('cac so chan va la boi cua 4 la: ');
for i:=1 to m do
if (b[i] mod 2=0) and (b[i] mod 4=0) then write(b[i]:4);
readln;
end.
Câu 2:
uses crt;
var s:string;
d,kt,i:integer;
begin
clrscr;
write('nhap xau S:'); readln(s);
d:=length(s);
kt:=0;
for i:=1 to d do
if (s[i] in ['A'..'Z']) or (s[i] in ['a'..'z']) then
begin
kt:=1;
write(s[i]:4);
end;
if kt=0 then writeln('Khong co ky tu nao la chu cai trong xau');
readln;
end.
B
b