Cấu trúc tổng quát của một chương trình Pascal

Thứ năm - 23/07/2020 11:11
Một chương trình viết bang Pascal nếu đầy đủ thì gồm có các phần sau: Tên chương trình, Chương trình con, thân chương trình chính, kết thúc chương trình.
1. Một chương trình viết bang Pascal nếu đầy đủ thì gồm có các phần sau:
PROGRAM TÊN_CHƯƠNG_TRÌNH (Tiêu đề)
{Phần khai báo dữ liệu}
         LABEL...
         CONST...
         TYPE...
         VAR...
{Phần mô tả chương trình con}
         PROCEDURE...
        FUNCTION...
{Thân chương trình chính}
        BEGIN
{Các lệnh được viết ở đây}
        END
{Kết thúc chương trình}

2. VÍ DỤ
Program PT_bậc_2 ;
Var a, b, c, x1, x2, Delta : Real ;
     Procedure NHAP ;
Begin
        Writeln (Giải phương trình bậc 2 : ax2 + bx + c = 0’);
        Write (nhập a, b, c);
        Readln (a, b, c) ;
End ;
BEGIN
         Nhap ;
         If a = 0 then Writeln (a = 0 - không giải)
         Else {a <>0}
              Begin
                  Delta := sqr(b) - 4*a*c ;
                  If Delta < 0 then Writeln (‘vô nghiệm’)
                  Else
                      if Delta = 0 then
                         Begin
                         x1 := -b/2/a ;
                         Writein ('Nghiệm kép :’ , , x1);
                  end ;
         else {Delta >0}
                 Begin
                     x1 := (-b-sqrt(delta))/2/a ;
                     x2 := -b/a – x1 ;
                    Writeln (‘x1 =’ , x1 , ‘x2 =' , x2);
                  end ;
        end ;
END.

  Ý kiến bạn đọc

THÀNH VIÊN

Hãy đăng nhập thành viên để trải nghiệm đầy đủ các tiện ích trên site
Kênh Bóng đá trực tiếp hôm nay miễn phí
Kênh
90Phut TV full HD
leo88 ⇔ hb 88 ⇔ go88 ⇔ u888

https://go88live.net/ ⇔ SHBET
đá gà net88 ⇔ U888 ⇔ BET88 ⇔ SHBET
link xem truc tiep bong da xoilac tv ⇔ https://104.248.99.177/
xem bóng đá cà khịa tv trực tuyến hôm nay
78win ⇔ ABC8 ⇔ hi88 ⇔ qq88
33 win ⇔ 789BET ⇔ bk8 đăng nhập
789BET ⇔ BJ88 ⇔ 789bet ⇔ hitclub
Kubet ⇔ QQ88 ⇔ qq 88
https://789betcom0.com/ ⇔ https://hi88.baby/
OK365 ⇔ https://98win.care/ ⇔ sunwin
QQ88 ⇔ leo88 login ⇔ https://88clbu.net/
789club ⇔ F168 ⇔ 8kbet ⇔ OKVIP
hi88 ⇔ BJ88 ⇔ 123b ⇔ sunwin
https://789club64.com/ ⇔ https://23win.build/
NOHU90 ⇔ 18win ⇔ https://fun88.social/
J88 ⇔ 8kbet ⇔ 33win ⇔ QQ88
789 club ⇔ hi88 ⇔ THABET
https://go88so.net/
8kbet ⇔ https://789club63.com/
https://king88aff.com/ ⇔ hi88 ⇔ 33WIN
https://0fun88.com/ ⇔ New88
https://qq88.fun/ ⇔ http://mu88.wine/
fun88 ⇔ 500ae ⇔ nhà cái net88
8kbet ⇔ s666 ⇔ https://kubetvn88.com/
https://8kbetwin.com/ ⇔ https://uk88.rocks
https://8xbet68.net/ ⇔ https://789bet188.com/
https://shbetb0.com/ ⇔ https://hello8880.net/
sunwin ⇔ ABC88 ⇔ hi88 ⇔ qh88 com
jun 88 ⇔ f168 ⇔ https://qq88.marketing/
F168 ⇔ new88 ⇔ LUCK8 ⇔ 78win
https://mb66az.com/ ⇔ https://789bet.green/
Link vào NEW88 ⇔ https://789club24.com/
https://33win103.com/ ⇔ Rikvip
https://888bz.vip ⇔ https://new88.today/
https://33win102.com/ ⇔ https://500ae.is/
https://33win100.com/ ⇔ https://ok365com.ink/
https://betvisa8.net/ ⇔ https://hi88.report/
https://hi88.tours/ ⇔ https://hubetu.com/
U888 ⇔ https://hi88.garden/
https://789bet188.us/ ⇔ https://hello880.net/
https://789club60.com/ ⇔ https://betvisacom2.com/
shbet ⇔ cwin ⇔ 68gamebai
qh88 đăng nhập ⇔ https://789club24.com/
SHBET ⇔ 33win ⇔ 8xbet com
sunwin ⇔ KUBET ⇔ BAY789
https://go88club13.com/https://789bet188.today/
https://bk8link2.com/ ⇔ https://bk8link3.com/
https://789bet188.xyz/ ⇔ https://jun88pro.club/
https://33win101.com/ ⇔ SHBET
https://u888ny.com/ ⇔ https://hi88.gives/
https://jofinch.london/ ⇔ J88
https://win55.sh/ ⇔ https://789bet188.pro/
https://king88.select/ ⇔ https://789bet188.cloud/
https://ww88.supply/ ⇔ https://nohu90m.net/
https://f8betlv.com/ ⇔ https://bj8884.com/
https://abc8.education/
Nhà cái SHBET
https://789bet188.info/ ⇔ https://789bet188.live/
https://789bet188.online/ ⇔ https://789bet188.co/
https://789bet188.tech/ ⇔ https://789bet188.biz/
https://789bet188.club/ ⇔ https://789bet188.vip/
https://789bet188.site/ ⇔ https://789bet.asia/
https://new8818.net/ ⇔ https://new8818.org/
https://new8818.me/ ⇔ https://new8818.xyz/
https://new8818.pro/ ⇔ https://new8818.cloud/
https://new8818.info/ ⇔ https://new8818.us/
https://new8818.live/ ⇔ https://new8818.online/
https://new8818.co/ ⇔ https://new8818.today/
https://new8818.biz/ ⇔ https://new8818.club/
https://new8818.vip/ ⇔ https://new8818.site/
https://new8818.ink/ ⇔ https://ahihi88.host/
https://hi8818.xyz/ ⇔ https://hi8818.us/
https://hi8818.blog/ ⇔ https://hi8818.online/
https://hi8818.site/ ⇔ https://hi8818.ink/
https://hi8818.cloud/ ⇔ https://hi8818.me/
https://shbet188.org/ ⇔ https://shbet188.pro/
https://shbet188.cloud/ ⇔ https://shbet188.ink/
https://shbet288.store/ ⇔ https://shbet288.today/
https://shbet288.tech/ ⇔ https://shbet188.xyz/
https://shbet188.us/ ⇔ https://shbet188.shop/
https://kubet288.com/ ⇔ https://kubet188.mobi/
https://kubet188.dev/ ⇔ https://kubet288.xyz/
https://kubet288.pro/ ⇔ https://kubet288.cloud/
https://jun8818.org/ ⇔ https://jun8818.net/
https://jun8818.me/ ⇔ https://jun8818.xyz/
https://jun8818.pro/ ⇔ https://jun8818.cloud/
https://jun8818.info/ ⇔ https://jun8818.us/
https://jun8818.live/ ⇔ https://jun8818.shop/
https://8kbet25.com/ ⇔ https://789win.navy/
https://loteriadeboyaca.com.co/
https://f8bet288.com/ ⇔ https://f8bet288.org/
https://f8bet288.net/ ⇔ https://f8bet288.me/
https://f8bet288.xyz/ ⇔ https://f8bet288.pro/
https://f8bet288.cloud/ ⇔ https://f8bet288.info/
https://f8bet288.us/ ⇔ https://f8bet288.live/
https://f8bet288.online/ ⇔ https://f8bet288.co/
https://f8bet288.today/ ⇔ https://f8bet288.biz/
Bạn đã không sử dụng Site, Bấm vào đây để duy trì trạng thái đăng nhập. Thời gian chờ: 60 giây