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.
Lời giải:
program hotrotinhoc;
var a,b : integer;
s: longint;
t: real;
begin
write('A='); readln(a);
write('B='); readln(b);
s:=a;
s:=s+b;
writeln(s);
s:=0;
s:=a;
s:=s-b;
writeln(s);
s:=0;
s:=a;
s:=s*b;
writeln(s);
t:=a;
t:=t/b;
write(t:1:2);
readln
end.
Google Sheet (hay Google Trang tính) là một ứng dụng bảng tính trực tuyến, miễn phí của Google, cho phép người dùng tạo, chỉnh sửa, phân tích dữ liệu và cộng tác theo thời gian thực với người khác. Nó tương tự như Microsoft Excel nhưng có nhiều ưu điểm như tự động lưu trữ trên đám mây (Google Drive), có thể truy cập trên mọi thiết bị và cho phép làm việc nhóm hiệu quả.
Bài 1:
Program hotrotinhoc;
var a,b,c,d,max: integer;
begin
write('Nhap a,b,c,d :'); readln(a,b,c,d);
max:=0;
if a>max then max:=a;
if b>max then max:=b;
if c>max then max:=c;
if d>max then max:=d;
write(max);
readln
end.
Bài 2:
Program hotrotinhoc;
var a,b,c : integer;
begin
write('Nhap 3 canh a,b,c'); readln(a,b,c);
if (a+b>c) or (a+c>b) or (b+c>a) then write('Thoa man') else ('Khong thoa man trong tung truong hop tuong ung');
readln
end.
Bài 4: Câu hỏi của Quỳnh Như - Tin học 8 | Học trực tuyến
Bài 5:
Program hotrotinhoc;
var a,n: integer;
t: longint;
begin
Write('Nhap a,n :'); readln(a,n);
t:=1;
for i:=1 to n do
t:=t*a;
write(t);
readln
end.
Bài 1:
program pstg;
uses crt;
var a,b,i,u : integer;
f : text;
BEGIN
clrscr;
assign(f,'PSTG.INP');
reset(f);
read(f, a);
read(f, b);
u:=1;
for i:= 1 to a do if ((a mod i)=0) and ((b mod i)=0) and (i>u) then u:=i;
a:= a div u;
b:= b div u;
assign(f,'PSTG.OUT');
rewrite(f);
write(f, a,' ',b);
close(f);
END.
bài 4 dễ ẹt à
uses crt;
const fi='quediem.inp';
fo='quediem.out';
var i,m,n,d,x,j,csc:longint;
a,b:array[1..1000]of integer;
f1,f2:text;
begin
clrscr;
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,n);
{-------------------------tim-so-lon-nhat--------------------------}
write(f2,'so lon nhat la: ');
m:=n;
if m mod 2=0 then
begin
for i:=1 to n div 2 do
write(f2,'1');
end
else begin
write(f2,'7');
for i:=2 to n div 2 do
write(f2,'1');
end;
{----------------------------tim-so-nho-nhat------------------------}
writeln(f2);
a[1]:=2; b[1]:=1;
a[2]:=5; b[2]:=2;
a[3]:=4; b[3]:=4;
a[4]:=6; b[4]:=6;
a[5]:=3; b[5]:=7;
a[6]:=7; b[6]:=8;
d:=(n div 7)+1;
if n mod 7=0 then d:=d-1;
if d=1 then begin
case n of
2:write(f2,'so nho nhat la: ',1);
3:write(f2,'so nho nhat la: ',7);
4:write(f2,'so nho nhat la: ',4);
5:write(f2,'so nho nhat la: ',2);
6:write(f2,'so nho nhat la: ',0);
7:write(f2,'so nho nhat la: ',8);
end;
end;
if d>1 then
begin
write(f2,'so nho nhat la: ');
for i:=1 to d do
if i=1 then begin
b[4]:=6;
for j:=1 to 6 do
begin
x:=n;
x:=x-a[j];
csc:=x div 7+1;
if x mod 7=0 then csc:=csc-1;
if csc=d-i then begin
write(f2,b[j]);
n:=x;
break;
end;
end;
end
else begin
a[1]:=6; b[1]:=0;
a[2]:=2; b[2]:=1;
a[3]:=5; b[3]:=2;
a[4]:=4; b[4]:=4;
a[5]:=3; b[5]:=7;
a[6]:=7; b[6]:=8;
for j:=1 to 6 do
begin
x:=n;
x:=x-a[j];
csc:=(x div 7)+1;
if x mod 7=0 then csc:=csc-1;
if csc=d-i then begin
write(f2,b[j]);
n:=x;
break;
end;
end;
end;
end;
close(f1);
close(f2);
readln;
end.
?
Là số tự nhiên trong tập hợp