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.
uses crt;
begin
clrscr;
writeln(2/7:4:2);
writeln(2/7+(46 mod 5):4:2);
writeln(18 div 3);
readln;
end.
Caua1:
program caumot;
begin
writeln('lop 8A chao ban!');
end.
Câu 2:
program cauhai;
int a,b,c :real;
begin
write('a='); readln(a);
write('b='); readln(b);
c= a+b;
write('Tong hai so a b la:',c);
end.
Câu 2:
Program nii;
Uses crt;
Var a,b,c,A:integer;
Begin
Write ('nhap a');
Readln (a);
Write ('nhap b');
Readln (b);
Write ('nhap c');
Readln (c);
A:=a;
If A<b then A:=b;
If A<c then A:=c;
Write ('Ket qua',A);
Readln;
End.
Câu 1
Program ntg;
Uses crt;
Var A,x,y:integer;
Begin
Write ('nhap x');
Readln (x);
Write ('nhap y');
Readln ('y');
A:=x+y;
Write ('Ket qua',A);
Readln;
End.
Tham khảo!
(----------------------------------1-----------------------------------------------)
program ho_tro;
uses crt;
var a,b,c,max: real;
begin
clrscr;
writeln(' nhap 3 so:'); readln(a,b,c);
max:=a;
max:=b;
max:=c;
if max<a then max:=a;
if max<b then max:=b;
if max<c then max:=c;
writeln(' so lon nhat trong 3 so la:',max);
readln;
end.
(-------------------------------------------------2----------------------------)
program ho_tro;
uses crt;
var a,b,c: integer;
begin
clrscr;
writeln(' nhap 3 so :'); readln(a,b,c);
if (a+b)>c or (a+c)>b or (b+c)>a then writeln(' la 3 canh cua tam giac:')
else writeln(' k phai 3 canh cua tam giac:');
readln;
end.
program TinhTong;
uses crt;
var
N, i, j, tich: integer;
S: real;
begin
clrscr;
write('Nhap so nguyen N: ');
readln(N);
S := 0;
tich := 1;
for i := 1 to N do
begin
tich := tich * i;
S := S + tich;
end;
writeln('Tong S = ', S:0:2);
readln;
end.
Tham khảo :
Writeln('16 div 3=', 16 div 3);
Writeln('15 mod 3=', 15 mod 3);
Writeln('1.2+1.2.3+1.2.3.4=',1*2+1*2*3+1*2*3*4);