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.
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.
var s:string;
f1:text;
a:byte;
begin
assign(f1,'c:\ghixau1.txt'); rewrite(f1);
readln(s);
writeln(f1,s);
close(f1);
End.
const fi='mang.txt';
fo='tong.txt';
var f1,f2:text;
a:array[1..100]of integer;
n,i,t:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewriteln(f2);
n:=0;
while not eof(f1) do
begin
inc(n);
read(f1,a[n]);
end;
t:=0;
for i:=1 to n do
t:=t+a[i];
writeln(f2,t);
close(f1);
close(f2);
end.
uses crt;
const fi='dulieu.txt';
var f1:text;
a,b,c:integer;
begin
clrscr;
assign(f1,fi); rewrite(f1);
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
write('Nhap c='); readln(c);
writeln(f1,a);
writeln(f1,b);
writeln(f1,c);
close(f1);
end.
const fi='input.txt';
fo='output.txt';
var f1,f2:text;
st:string[125];
a:array[1..125]of string;
i,d,dem,kt,j:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,st);
d:=length(st);
dem:=1;
a[1]:=st[1];
for i:=1 to d do
begin
kt:=0;
for j:=1 to dem do
if a[j]=st[i] then kt:=1;
if kt=0 then
begin
inc(dem);
a[dem]:=st[i];
end;
end;
for i:=1 to dem do
begin
dem1:=0;
for j:=1 to d do
if a[i]=st[j] then inc(dem1);
writeln(f2,a[i],' xuat hien ',dem1,' lan');
end;
close(f1);
close(f2);
end.
const fi='input.txt';
fo='output.txt';
var st:string;
f1,f2:text;
i,d:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,st);
d:=length(st);
for i:=1 to d do
if st[i]<>#32 then write(f2,st[i]);
close(f1);
close(f2);
end.
1:
uses crt;
const fi='ketqua.txt';
var f1:text;
st:string;
i,d:integer;
begin
clrscr;
assign(f1,fi); rewrite(f1);
write('Nhap xau:'); readln(st);
d:=length(st);
for i:=1 to d do
if st[i]=#32 then delete(st,i,1);
writeln(f1,st);
close(f1);
end.
2:
uses crt;
var a,b,c,d:integer;
{----------chuong-trinh-con-----------------------}
function min(x,y:integer):integer;
begin
if x<y then min:=x
else min:=y;
end;
{---------------chuong-trinh-chinh--------------------}
begin
clrscr;
write('a='); readln(a);
write('b='); readln(b);
write('c='); readln(c);
write('d='); readln(d);
writeln(min(a,min(b,min(c,d))));
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long a,b,c,d;
int main()
{
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
cin>>a>>b>>c>>d;
cout<<a+b+c+d;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
freopen("baitho.txt","w",stdout);
cout<<"Anh di anh nho qua nha"<<endl;
cout<<"Nho canh rau muong nho ca ram tuong";
return 0;
}