Mấy chế nghe debut song của TXT chưa? Hay hông...T bắt đầu sắp trở thành fan của TXT mất ròi!
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 fi1='nguyen1.txt';
fi2='nguyen2.txt';
fo='nguyen.txt';
var f1,f2,f3:text;
a,b:array[1..100]of integer;
n,m,i:integer;
begin
assign(f1,fi1); reset(f1);
assign(f2,fi2); reset(f2);
assign(f3,fo); rewrite(f3);
n:=0;
while not eof(f1) do
begin
inc(n);
readln(f1,a[n]);
end;
m:=0;
while not eof(f2) do
begin
m:=m+1;
readln(f1,b[m]);
end;
for i:=1 to n do
writeln(f3,a[i]);
for i:=1 to m do
writeln(f3,b[i]);
close(f1);
close(f2);
close(f3);
end.
1. No, I don't.
2. No, I am.
3. No, I am.
4. My favourite song is Kimi Ga Ireba.
var f:text;
s:string;
i,dem,max,dau,cuoi:byte;
begin
assign(f,'xau1.txt'); reset(f);
readln(f,s);
close(f);
assign(f,'xau2.txt'); rewrite(f);
dem:=1; max:=1; dau:=1; cuoi:=1;
for i:=1 to length(s)-1 do
begin
if s[i]=s[i+1] then inc(dem) else dem:=1;
if dem>max then
begin
max:=dem;
cuoi:=i+2;
dau:=cuoi-dem;
end;
end;
write(f,dau,':',cuoi);
close(f);
readln;
end.
Program hotrotinhoc;
const fi='xau1.txt';
fo='xau2.txt';
var
f:text;
s:string;
i,d,c,j:byte;
procedure ip;
begin
assign(f,fi);
reset(f);
read(f,s);
close(f);
end;
procedure out;
begin
assign(f,fo);
rewrite(f);
j:=0;
for i:= 1 to length(s) do
begin
if j=0 then j:=i;
if s[i] <> s[i+1] then
begin
if ((i-j)+1)>((c-d)+1) then
begin
d:=j;
c:=i;
end;
j:=0;
end;
end;
write(f,d,':',c);
close(f);
end;
BEGIN
ip;
out;
END.
16 là đến chữ a không phải chữ c mà. Nếu bạn muốn in ra 16 thì chỉ cần write(f,d,':',c+1);
Tại vì cái này là xuất ra file nên bạn hãy bỏ cái uses crt; clrscr; readln là sẽ chạy rất tốt
=> Mk tự làm, có gì sai sót mg bạn thông cảm (còn nhiều bài lắm)
This is my idol. She is JENNIE. She comes from Korean. She is 27 years old. She works in YG ENT. She is a member of BLACKPINK and she is main rapper in BLACKPINK. She started working as a YG ENT trainess at the age of 16. She sings very well. Her favourite colour is pink. She is so cute.
B2: about WONYOUNG
My idol is Wonyoung. Her full name is Jang Wonyoung. She is 19 years old. She is Korean. She was a member of IZ*ONE from 2016 to 2020, and she is a member of IVE from 2021 to present. She is visual of group. The company she works is Starship ENT. She doesn't have a good voice but I like her
a)
PROGRAM BAI1a;
VAR N, Tle, Tchan: integer;
BEGIN
Write ('Nhap N =');
Readln (N);
If (N mod 2) = 0 Then
Tle := N*((N - 2)/2 + 1)/2;
Tchan := (N + 2)*((N - 2)/2 + 1)/2;
If (N mod 2) = 1 Then
Tle := (N + 1)*((N-1)/2 +1)/2;
Tchan := (N + 1)*((N - 3)/2 + 1)/2;
WRITELN ('Sle =', Sle, 'Schan =', Schan);
READLN;
END.
3 bài đúng hong nhở
ko là chế cũng ch từng nghe qua!