Uploaded by
Duy Anh
0% found this document useful [0 votes]
192 views
15 pages
Original Title
bai tap pascal thi hsg mlem mlem
Copyright
© © All Rights Reserved
Available Formats
DOC, PDF, TXT or read online from Scribd
Share this document
Did you find this document useful?
Is this content inappropriate?
0% found this document useful [0 votes]
192 views15 pages
Bai Tap Pascal Thi HSG Mlem Mlem
Uploaded by
Duy Anh
Jump to Page
You are on page 1of 15
Search inside document
Reward Your Curiosity
Everything you want to read.
Anytime. Anywhere. Any device.
No Commitment. Cancel anytime.
BÀI TẬP PASCAL ÔN THI HỌC SINH GIỎI
4.1 Viết chương trình nhập vào 2 số nguyên, kiểm tra xem chúng có phải là ước của nhau không
Program bt4_1;
Var a,b:integer;
Begin
write['nhap a,b:'];
readln[a,b];
if [a mod b] \= 0 then writeln[b,' la uoc cua ',a]
else writeln[b,' khong la uoc cua ',a];
if [b mod a] \= 0 then writeln[a,' la uoc cua ',b]
else writeln[a,' khong la uoc cua ',b];
readln;
End.
4.2 Viết chương trình giải hệ phương trình:
Program bt4_2;
Var a,b,c,d,e,f,dt,dx,dy,x,y:real;
Begin
write['nhap a,b,c,d,e,f:'];
readln[a,b,c,d,e,f];
dt:=a*d-b*c;
dx:=b*f-e*d;
dy:=a*f-c*e;
if dt0 then
begin
x:=dx/dt;
y:=dy/dt;
writeln['ptr co nghiem x,y',x:10:2,y:10:2];
end;
if dt=0 then
if [dx\=0] and [dy\=0] then writeln['ptr vo so nghiem'];
if [dx\=0] and [dy0] then writeln['ptr vo nghiem'];
readln;
End.
4.3 Viết chương trình nhập vào 3 số nguyên a, b, c. Kiểm tra xem 3 số đó có thỏa mãn:
- Là 3 cạnh của 1 tam giác thường
- Là 3 cạnh của 1 tam giác cân
- Là 3 cạnh của 1 tam giác đều
- Không là 3 cạnh của 1 tam giác
Program bt4_3;
Var a,b,c:integer;
Begin
Trường THCS Phú Lâm