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.
1,
program so_nguyen;
uses crt;
var a,b:real;
begin
writeln('Nhap so thu nhat');,readln(a);
writeln('Nhap so thu hai');readln(b);
If (a>0) and (b>0) then writeln('cung dau') else write('khong cung dau');
If (a<0) and (b<0) then writeln('cung dau') else write('khong cung dau');
2,, program so_nguyen;
uses crt;
var a,b:real;
begin
writeln('Nhap so thu nhat');,readln(a);
writeln('Nhap so thu hai');readln(b);
If a>b then write('so thu nhat lon hon');
If a<b then write('so thu hai lon hon');
readln
end.(Pascal nha) - Có thể dùng If...then... hoặc while...do...
begin
writeln('*****');
writeln('*****');
writeln('*****');
writeln('*****');
writeln('*****');
readin
end.
Link phần mềm học tiếng anh trực tuyến và hiệu quả đây nhé mọi người:
https://iostudy.net/ref/132215
mình đang cần gấp
thi tiếp à em ?
yep
không ai giúp thì mình tự share code đây:
var d,j,i,d1,d2:integer;k:longint;s:string;
a:array[0..2000] of char;
begin
k:=0;
assign(input,'tenthieng.inp');reset(input);
assign(output,'tenthieng.out');rewrite(output);
read(s);
for i:=1 to length(s) do
begin
inc(d);a[d]:=s[i];
end;
for i:=1 to d do k:=k+i;
for i:=1 to d-1 do
for j:=i+1 to d do
if a[i]=a[j] then
begin
d1:=i;d2:=j;
while (a[d1]=a[d2]) do
begin
dec(k);
dec(d1);dec(d2);
end;
break;
end;
write(k);
readln
end.