tailieunhanh - Bài tập pascal : Lời giải, đáp án part 9

Turbo Pascal là trình biên dịch Pascal thống trị cho PC vào thập niên 1980 và đầu thập niên 1990. Nó phổ biến vì các mở rộng mạnh mẽ và đặc biệt là thời gian biên dịch cực kì ngắn. Trong thời điểm hiện tại, các phiên bản cũ của Turbo Pascal (tới ) có thể tải xuống miễn phí tại trang web của Borland (tuy nhiên vẫn cần phải đăng ký). | Bai Uses Graph Crt Procedure Khoitao_Dh Var Integer Begin grDriver Detect InitGraphfgrDriver grMode if GraphResult grOk then WritelnfGraphics error GraphErrorMsg GraphResult End Procedure Ve_Duongthang a b c d integer Var x1 y1 x2 y2 temp lnteger k real Begin if a c then begin line a 5 c 475 exit end k d-b c-a x1 a tim giao voi canh phai While x1 640 do begin temp Round k x1-a b if temp 0 and temp 480 then y1 temp else break Inc x1 end x2 a tim giao voi canh trai While x2 0 do begin temp Round k x2-a b if temp 0 and temp 480 then y2 temp else break Dec x2 end Line x1 y1 x2 y2 End 241 16- BỈLĨ Var x y angle lnteger Const Pi ox 220 oy 240 tam BEGIN Khoitao_Dh angle 0 Repeat x ox Round 200 cos Pi angle 180 y oy-Round 200 sin Pi angle 180 Ve_Duongthang ox oy x1y angle angle 10 Delay 500 Until KeyPressed CloseGraph END. Bai Uses Graph Type Diem Record integer end Var Dinh array of Diem i byte angle integer Procedure khoitao_Dh Var Integer Begin grDriver Detect lnitGraph grDriver grMode if GraphResult grOk then WritelnfGraphics error GraphErrorMsg GraphResult End Procedure Ve_khung A B Diem Ve khung sao Begin Line 242 Line Line Line Line End Procedure To_sao To mau sao Begin setFillstyle 1 .yellow floodfill 320 240 yellow floodfill 320 200 yellow floodfill yellow floodfill 360 220 yellow floodfill 360 280 yellow floodfill 280 280 yellow End BEGIN angle 90 for i 1 to 5 do begin Dinh i .x 320 Round 100 cos angle Pi 180 Dinh i .y 240-Round 100 sin angle Pi 180 angle angle 72 end Khoitao_Dh SetColor red Rectangle 120 100 setFillstyle floodfill 320 SetColor Yellow Ve_khung Dinh 1 .Dinh 3 lDinh 5 .Dinh 2 Dinh 4 To_sao END. .

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.