Những câu hỏi liên quan
U Lan
Xem chi tiết
U Lan
Xem chi tiết
U Lan
Xem chi tiết
U Lan
Xem chi tiết
Ngọc Hồng
Xem chi tiết
Nguyễn Lê Phước Thịnh
17 tháng 3 2022 lúc 14:48

#include <bits/stdc++.h>

using namespace std;

string st;

int d,i,dem;

int main()

{

freopen("xau.inp","r",stdin);

freopen("xau.out","w",stdout);

cin>>st;

d=st.length();

dem=0;

for (i=0; i<=d-1; i++)

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

cout<<dem;

return 0;

}

Bình luận (0)
APOK FF
Xem chi tiết
Quỳnh Anh Đào
Xem chi tiết
Hello Det
4 tháng 5 2022 lúc 19:27

code pascal

var f,g:text;

var s:string;

begin

assign(f,'cau2.txt'); reset(f);

read(f,s);

assign(g,'KQ.txt'); rewrite(g);

write(g,upcase(s));

close(f);

close(g);

end.

Bình luận (0)
LA VAN CAU
Xem chi tiết
Cao Thị Hoa
Xem chi tiết
Nguyễn Lê Phước Thịnh
5 tháng 5 2021 lúc 13:11

const fi='kt.txt'

fo='kq.out'

var f1,f2:text;

s:string;

i,dem,d:integer;

begin

assign(f1,fi); reset(f1);

assign(f2,fo); rewrite(f2);

readln(f1,s);

vt:=pos('anh',s);

while vt<>0 do

begin

delete(s,vt,3);

insert(s,vt,'em');

vt:=pos('anh',s);

end;

writeln(f2,s);

close(f1);

close(f2);

end.

Bình luận (0)