Page 1

    โ€ซ ุงโ€ฌ ูโ€ซ ุงโ€ฌ     ู   โ€ซุงโ€ฌ โ€ซูˆู„โ€ฌMโ€ซุฃ>ย™) ุงุจ ุงโ€ฌ

( / ) " ) โ€ซุงุถโ€ฌ#'(โ€ซ" ู‡   ุฏุฉ ุงโ€ฌ#โ€ซ ุงโ€ฌ$%  (1 ( X ) Ms-Dos โ€ซู… ุง ูˆุณโ€ฌ. /01 21 "#โ€ซ ุงโ€ฌ$โ€ซ ุงโ€ฌ3 #โ€ซ(  ุงโ€ฌ2 ( / ) โ€ซุงุฌโ€ฌ#@(โ€ซ < ) ุง(ุฏ@ู„ ูˆุงโ€ฌ%#โ€ซ( ุฅ ; ุง>= ุงู… ุง) ุงโ€ฌ3 ( / )"#Cโ€ซ"ุงโ€ฌJโ€ซุฑโ€ฌFCโ€ซ ุงโ€ฌD#โ€ซุน ุงโ€ฌF  GD#โ€ซ ุงโ€ฌH #% โ€ซุฏโ€ฌFDF% "#โ€ซ ุงโ€ฌ$โ€ซ ุงโ€ฌ3 #โ€ซ  ุงโ€ฌI1 (4 ( / )%โ€ซุงโ€ฌOD PDโ€ซ ูˆุงโ€ฌGQ1  H #โ€ซ; ุงโ€ฌ1 โ€ซุฏูˆุงุช ุงโ€ฌMโ€ซ  ุงโ€ฌJ โ€ซ ุงโ€ฌ$% โ€ซุงู„โ€ฌF3Cโ€ซ ุงโ€ฌ$)1 (5 ( / )โ€ซ>ู„โ€ฌSโ€ซ ูˆุงโ€ฌGPCโ€ซ) ุงโ€ฌP> "#โ€ซ ุงโ€ฌ$โ€ซ(  ุงโ€ฌ6 ( / )/<F>โ€ซูˆโ€ฌ#;J โ€ซุขโ€ฌ#Z โ€ซ ูˆู‡  ุฅ

ุงุฏโ€ฌBasic  #JF1 "#โ€ซ ุงโ€ฌ$โ€ซ  ุงโ€ฌ#1 (7 `C=^ 3 #โ€ซ^  ุง(_   ุงโ€ฌ% .โ€ซูŠโ€ฌFโ€ซ  ุงโ€ฌ3 #โ€ซ"  ุช ุงโ€ฌ#โ€ซ ุงโ€ฌ$โ€ซ ุงโ€ฌ3 #โ€ซ  ุงโ€ฌ#1 (8 ( / )โ€ซูŠโ€ฌFโ€ซุงโ€ฌ bc0J โ€ซู‡โ€ฌOC^% โ€ซ ูˆุงโ€ฌ3 #โ€ซ ู‰ ุช ุงโ€ฌef% %F; โ€ซ ูˆุง)ุชโ€ฌ# โ€ซูˆุงโ€ฌMโ€ซ   ุงโ€ฌF3  โ€ซ ุฑุฉโ€ฌFโ€ซ ู‡โ€ฌH #โ€ซ( ุงโ€ฌ9 2008( / )  โ€ซุถโ€ฌ#' ( / )(โ€ซ ุฉ ูˆู‡  ุงโ€ฌeโ€ซ  ูˆุงโ€ฌSโ€ซุจ ุฅโ€ฌF>0โ€ซ ุงโ€ฌGPCJ S (10 ( / )"1โ€ซุ›โ€ฌ0" "^jโ€ซุฑู… ุงโ€ฌMโ€ซู†  ุงโ€ฌF;1 (โ€ซ(  ุงโ€ฌ11 ( / )ู‹"JI< (โ€ซ  ุงโ€ฌ2j1 ;J (12 ( / )โ€ซุจโ€ฌF>0โ€ซ ูˆุงโ€ฌH #โ€ซ ุงโ€ฌ% Gโ€ซู‡โ€ฌC) q>Fโ€ซ ุขโ€ฌCode โ€ซุฉโ€ฌ#Cmโ€ซ ุงโ€ฌ21 (13 ( / )) โ€ซ ูˆโ€ฌZ P (โ€ซ) ุงโ€ฌ% H #โ€ซ ุงโ€ฌ%โ€ซ ุขโ€ฌ#1 (14 ( / )GD# wโ€ซ ุฅโ€ฌMachine Language (โ€ซุฌ  ุงโ€ฌ01 S (15 ( X )Sโ€ซ) ุงโ€ฌ% H #โ€ซ ุงโ€ฌ%โ€ซ^ุก ุขโ€ฌzโ€ซ_ ุฃโ€ฌFP% P00Q1โ€ซ@ุก ูˆโ€ฌMโ€ซู ุงโ€ฌmโ€ซ; ุงุขโ€ฌJ (16 โ€ซ   ุง(ู†โ€ฌJ# โ€ซ  ุชโ€ฌD#โ€ซ ูˆุฑ ุงโ€ฌ% โ€ซู…โ€ฌFcJ H #%  โ€ซ ุฑุฉโ€ฌFโ€ซ ู‡โ€ฌGD#โ€ซ( ุงโ€ฌ17 ( / )(โ€ซ  ุงโ€ฌwโ€ซู‰"ุฅโ€ฌFโ€ซ" ุฃูŠ   ุงโ€ฌ ( / )GD#โ€ซ ุงโ€ฌFโ€ซุจ ู‡โ€ฌF>0โ€ซ  ุงโ€ฌwโ€ซ_ ุฅโ€ฌD#1โ€ซ ูˆโ€ฌPPCJ )% _3 #% %โ€ซ ุขโ€ฌH #) |J โ€ซูŠโ€ฌOโ€ซ ุงโ€ฌH #โ€ซ( ุงโ€ฌ18 2008( / ))D )D D#โ€ซู† ) ุงโ€ฌF;1 interpreter"#Cโ€ซุฑูŠ"ุงโ€ฌFCโ€ซ ุงโ€ฌD#โ€ซ( < ุงโ€ฌ19 _D#1 โ€ซุจโ€ฌF)โ€ซ ุง^ย‚ ุงโ€ฌ2โ€ซุก  ุขโ€ฌPSโ€ซ ุงโ€ฌ% Sโ€ซ ุฅโ€ฌD#โ€ซ ุงโ€ฌG1 S Compiler"โ€ซูโ€ฌ#Qโ€ซ ุง;)"ุงโ€ฌD#โ€ซ( < ุงโ€ฌ20 2008( / )"โ€ซ ุฉโ€ฌeโ€ซ ุฏ< ูˆุงโ€ฌD#โ€ซ" ุฃูŠ ุงโ€ฌ 2005( / ) );โ€ซ ุงโ€ฌD#1โ€ซ ูˆโ€ฌJโ€ซุฑโ€ฌFCโ€ซ ุงโ€ฌD#1 : D#โ€ซ   ุงโ€ฌF โ€ซ( ู‡^ูƒโ€ฌ21 ( / )ย„ โ€ซ ุฃูŠโ€ฌ2e cJ# ย… Z#Jโ€ซุจ ูˆโ€ฌF>0) #;CJ โ€ซูŠโ€ฌOโ€ซ ุงโ€ฌFโ€ซ( ุง(ู† ู‡โ€ฌ22 H"^โ€ซ ูˆ

ู… ุง^ู† ูˆุง  < ุฅ ุก ุงโ€ฌ%0โ€ซุงุก ุง) ุงโ€ฌ#Dโ€ซ  < ุฅโ€ฌ#% โ€ซุจโ€ฌF>0โ€ซ ุง(ู†  ุงโ€ฌIJ (23 ( X)00Qโ€ซุงโ€ฌ ( / )JF)โ€ซุง

ุงโ€ฌFcโ€ซุฏุงุช ูˆุงโ€ฌ#Cโ€ซ ูˆุฏ  ุงโ€ฌ0 โ€ซู† 

ุฏโ€ฌF;1 โ€ซู‰โ€ฌFโ€ซ  ุงโ€ฌ3 #โ€ซ(  ุงโ€ฌ24 ( / )ย…OC^1 2 _(โ€ซ  ุงโ€ฌwโ€ซ_ ุฅโ€ฌD# GD# wโ€ซู‰ ุฅโ€ฌFโ€ซ  ุงโ€ฌ3 #โ€ซุฌ  ุงโ€ฌ01 (25 ( / ) "#โ€ซ ุงโ€ฌ$โ€ซ ุงโ€ฌwโ€ซ ุฅโ€ฌ$โ€ซ  ุงโ€ฌ#JF1 G1 (26 ( / )"ย‡Qโ€ซ  ุง(ย† ุงุฑุงุช"ุฃูŠ ุงโ€ฌJ โ€ซ ุงโ€ฌ$โ€ซ ุงโ€ฌ2j 3 #โ€ซู†  ุงโ€ฌF;1  (27 Dos โ€ซู… ุง ูˆุณโ€ฌ. /01 ย‡Qโ€ซย ุงโ€ฌD 21 Quick Basic;Turbo Basic;GW-Basic;Visual Basic (28 2003( / ) Windowsโ€ซ^ ูˆุฒโ€ฌJFโ€ซู… ุงโ€ฌ. /01 21 P<Visual Basic ย† โ€ซ 

ุงโ€ฌ ( / )โ€ซ ุชโ€ฌF)โ€ซ ุงโ€ฌ2cโ€ซุช ูˆโ€ฌSQ1Sโ€ซุจ < ุงโ€ฌF>0โ€ซ= ู… ุงโ€ฌJ (29 2007( / )"H1^โ€ซุช"ุงโ€ฌD#=โ€ซ ุง @ุช"ุงุช" ูˆุงโ€ฌJ 01 ย„โ€ซ ุงโ€ฌJ 01 )e# `1 (30 ( / )" โ€ซุงุฑุฒโ€ฌF=โ€ซุจ"ุงโ€ฌF)โ€ซ ุงโ€ฌ20โ€ซ ุงโ€ฌwโ€ซู‡ ุฅโ€ฌOC^1 ^ โ€ซย“ุฏูŠโ€ฌ1 โ€ซุงุช ุงโ€ฌF=โ€ซ   ุงโ€ฌF3 โ€ซ ู‡โ€ฌ20โ€ซ ุงโ€ฌGQ1 (31 GD#โ€ซุง> ุงโ€ฌF% _<mโ€ซ; ุงุขโ€ฌJโ€ซ ูˆโ€ฌJF)โ€ซุง

ุงโ€ฌFcโ€ซ ุงโ€ฌC= 3 โ€ซ ุซโ€ฌ0J Syntax Errorโ€ซูŠโ€ฌF)โ€ซ( ุง=ย„ ุงโ€ฌ32 2005โ€ซุ›โ€ฌ2004โ€ซุ›โ€ฌ2003( / ) _<mโ€ซ ุงุขโ€ฌGD#โ€ซย ุงโ€ฌJ Sโ€ซ ูˆโ€ฌH #โ€ซ ุงโ€ฌ%#3% Logical Error c^โ€ซู ุง=ย„ ุงโ€ฌmโ€ซ; ุงุขโ€ฌJ (33 2005โ€ซุ›โ€ฌ2004โ€ซุ›โ€ฌ2003( / ) ( / )H #โ€ซ ุงโ€ฌOC^1 H1 < โ€ซ ุฏ ู‹ุฉโ€ฌc^โ€ซ ุซ ุง=ย„ ุงโ€ฌ0J (34  โ€ซุง  ุงู…โ€ฌ:โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ฌ

-1-


โ€ซโ€ช(35โ€ฌโ€ฌ โ€ซโ€ช(36โ€ฌโ€ฌ โ€ซโ€ช(37โ€ฌโ€ฌ โ€ซโ€ช(38โ€ฌโ€ฌ โ€ซโ€ช(39โ€ฌโ€ฌ โ€ซโ€ช(40โ€ฌโ€ฌ โ€ซโ€ช(41โ€ฌโ€ฌ โ€ซโ€ช(42โ€ฌโ€ฌ โ€ซโ€ช(43โ€ฌโ€ฌ โ€ซโ€ช(44โ€ฌโ€ฌ โ€ซโ€ช(45โ€ฌโ€ฌ

โ€ซุง=โ€ชFโ€ฌุงุฑุฒ  ู‡ โ€ช   F3โ€ฌุง=โ€ชFโ€ฌุงุช ุง โ€ชย“1โ€ฌุฏูŠ ^ โ€ชOC^1โ€ฌู‡ ุฅโ€ช wโ€ฌุงโ€ช 20โ€ฌุง)โ€ชFโ€ฌุจ >โ€ชOP% /โ€ฌุง ุงโ€ชู‹ )=1 G>Sโ€ฌุง โ€ชOโ€ฌุขโ€ช#โ€ฌู‰โ€ฌ โ€ซุงโ€ช Gโ€ฌุง)โ€ช w>F % 0 Gโ€ฌุง=โ€ชFโ€ฌุงุฑุฒ ุงโ€ชOโ€ฌูŠ ย‡ < )โ€ช Gโ€ฌุงโ€ช2004( / )#3โ€ฌุ›โ€ช2005โ€ฌุ›โ€ช2006โ€ฌุ›โ€ช2008โ€ฌโ€ฌ โ€ซุง=โ€ชFโ€ฌุงุฑุฒ  ู‡ โ€ช   F3โ€ฌุง=โ€ชFโ€ฌุงุช ุงโ€ช bJ#ย›  ^ );m 20 1#โ€ฌุงโ€ช2003( / )ยš>0โ€ฌโ€ฌ โ€ซุง=โ€ช qโ€ฌุงโ€ช %Sโ€ฌู‡โ€ช Fโ€ฌุฑุฉ  โ€ช   F3โ€ฌุงโ€ช GP>Mโ€ฌูˆุง(โ€ช;Zโ€ฌู„ ุงโ€ช > ^Pโ€ฌุง โ€ช =1โ€ฌู… โ€ช |ยœFโ€ฌุง=โ€ชFโ€ฌุงุฑุฒ โ€ฌ โ€ซ) โ€ช2007( /โ€ฌโ€ฌ โ€ซโ€ช =Jโ€ฌู… ุงโ€ช 2;mโ€ฌุง ุง"โ€ช#โ€ฌูŠ < ุง=โ€ช qโ€ฌุงโ€ช ) %Sโ€ฌุงโ€ช Jโ€ฌูˆุง^โ€ช( X )JPโ€ฌโ€ฌ โ€ซโ€ช =Jโ€ฌู… ุงโ€ช) ย%#โ€ฌุช ุงโ€ช %0โ€ฌูˆโ€ช 1โ€ฌุงโ€ช#) Gcโ€ฌุงุช) โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ช =Jโ€ฌู… โ€ชFโ€ฌุงุฒูŠ ุงโ€ชยœMโ€ฌุน โ€ช

c%โ€ฌุฉ ุฃ<โ€ช < cโ€ฌุง=โ€ช qโ€ฌุงโ€ช@ %Sโ€ฌุฑ"ุงโ€ชcโ€ฌุฑ") โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ช =Jโ€ฌู… โ€ชFโ€ฌุงุฒูŠ ุงโ€ชยœMโ€ฌุน โ€ชI%โ€ฌุงูˆโ€ช w) Jโ€ฌุงโ€ชFโ€ฌู‰ ุงโ€ช < c<Mโ€ฌุง=โ€ช qโ€ฌุงโ€ช#c) %Sโ€ฌุงุกุฉ ูˆุง;โ€ช%โ€ฌโ€ฌ โ€ซ"ุฃูŠ ุง(ุฏ@ู„ ูˆุง(@โ€ช#โ€ฌุงุฌ") โ€ช( Xโ€ฌโ€ฌ โ€ซูˆโ€ช =1โ€ฌู… ุงโ€ช < GP>Mโ€ฌุง=โ€ช qโ€ฌุงโ€ชF@ % q%#) %Sโ€ฌุฉ ูˆุฃ@โ€ช#โ€ฌู‰ ูˆโ€ช 2)1 |ยœFโ€ฌุง)ุช) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช #Jโ€ฌุง=โ€ช qโ€ฌุงโ€ช %Sโ€ฌุฃุขโ€ช #jโ€ฌูˆยœโ€ช ย†@ eFโ€ฌุฅุฐุง ุขโ€ช /โ€ฌู‡^ูƒ  โ€ช#Jโ€ฌู โ€ชc)0%โ€ฌุช) โ€ช( /โ€ฌโ€ฌ โ€ซุฅุฐุง ุขู† ุงโ€ช m H #โ€ฌูˆย›โ€ช 2`CJ JFโ€ฌุง>= ุงู… ุง=โ€ชFโ€ฌุงุฑุฒ  "ุฃูŠ ุง=โ€ชFโ€ฌุงุช ุงโ€ช #โ€ฌุฃูˆ @ ุงโ€ช"2โ€ฌโ€ฌ โ€ซโ€ช PMโ€ฌุฃุขโ€ช# #jโ€ฌูˆ) โ€ช( /โ€ฌโ€ฌ โ€ซ ^ ูˆโ€ชFDโ€ฌุฏ ุข) )โ€ช < (weโ€ฌุง=โ€ชFโ€ฌุงุฑุฒ  โ€ช ^1โ€ฌูˆโ€ชFDโ€ฌุฏ โ€ช( / )c)eโ€ฌโ€ฌ

โ€ซุฃ>ย™) ุงุจ ุงโ€ชjโ€ฌโ€ฌ โ€ซโ€ช #1 (46โ€ฌุงโ€ช#0โ€ฌูˆู ุงโ€ช  F3  ^1โ€ฌุฑ โ€ชFโ€ฌุฒ ุงโ€ช $โ€ฌุงโ€ช( X ) "#โ€ฌโ€ฌ

โ€ซโ€ช#Zโ€ฌูˆุท โ€ช 1โ€ฌุง>โ€ช Gโ€ฌุงโ€ช#โ€ฌโ€ฌ โ€ซโ€ชF3J (47โ€ฌุฒ ุง>= ุงู… ุงโ€ช#0โ€ฌูˆู ุงโ€ช ^1โ€ฌุขย„>ุก )โ€ช#โ€ฌุงุช) โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ช -1โ€ฌุฃู† โ€ช J Sโ€ฌุฃ โ€ช.G#%โ€ฌโ€ฌ โ€ซโ€ชF3J (48โ€ฌุฒ ุง>= ุงู… ุงโ€ช#0โ€ฌูˆู โ€ช )%โ€ฌุงโ€ช %#โ€ฌุขย„>ุก )โ€ช#โ€ฌุงุช) โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ช -2โ€ฌุฃู† โ€ชF0J Sโ€ฌูŠ )โ€ช wโ€ฌุฑ โ€ชFโ€ฌุฒ ุฃูˆ  ุช ุฃูˆ <โ€ช#โ€ฌุง'ุชโ€ฌ โ€ซโ€ชF3J (49โ€ฌุฒ ุง>= ุงู… ุงโ€ช#0โ€ฌูˆู โ€ช )%โ€ฌุงโ€ช %#โ€ฌุฃูˆ ุงโ€ช#0โ€ฌูˆู ุงโ€ช^1โ€ฌโ€ฌ โ€ซ 

ุง ุงโ€ชF #โ€ฌุฒ ุง โ€ช J w) ยยœF1โ€ฌุง>โ€ช Gโ€ฌุงโ€ช#โ€ฌโ€ฌ โ€ซ< ุงโ€ชFjโ€ฌุงโ€ช /%โ€ฌุงโ€ช( / )<#0โ€ฌโ€ฌ โ€ซูˆโ€ช =1โ€ฌู… ยฌ ู†  ุงโ€ช.#โ€ฌโ€ฌ โ€ซโ€ช (50โ€ฌุงโ€ช /%jโ€ฌู‡โ€ช Fโ€ฌุงโ€ช cโ€ฌุง โ€ช wc1โ€ฌุข ู‡ @ู„ ) ) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ชF3J S-3โ€ฌุฒ ุง>= ุงู… ุงโ€ชMโ€ฌูˆุง โ€ช"#โ€ฌูˆู‡ ุง;)ุช ุงโ€ชF30โ€ฌุฒุฉโ€ฌ โ€ซโ€ช( / ) <#e /%z "7=3+4" )D #1 (51โ€ฌโ€ฌ โ€ซุง โ€ช =1โ€ฌู… < ุงโ€ชMโ€ฌูˆุง โ€ช #โ€ฌูˆุงุฑุงุช ุง โ€ชP =Jโ€ฌโ€ฌ โ€ซโ€ช-:โ€ฌโ€ฌ โ€ซโ€ช (52โ€ฌุงโ€ช G#โ€ฌุฅุฐุง ูˆยœย โ€ชI ย‚Q^1   %โ€ฌุฏูˆโ€ชF3< (/)ู‹ <#e ู‹ %z #J Dโ€ฌุงู„ โ€ชู‹ j< $%โ€ฌโ€ฌ โ€ซโ€ช =>% |J Sโ€ฌุงู… ุข)โ€ช printโ€ฌุข>โ€ชf< #) Gโ€ฌุฐุงโ€ฌ โ€ซโ€ช (53โ€ฌุงโ€ช #โ€ฌู‡โ€ช Fโ€ฌุฑุฉ  ุง>โ€ช < ยF Gโ€ฌุงโ€ชOโ€ฌุงุขโ€ช#โ€ฌุฉ ุงโ€ชRam "#โ€ฌโ€ฌ โ€ซุงโ€ชOP% #  /3eโ€ฌุง ุงโ€ช $^;< G>Sโ€ฌุฃู† โ€ชยš;1โ€ฌโ€ฌ โ€ซ) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช  JI=1 _< GJโ€ฌู‡โ€ชOโ€ฌุง ุงโ€ช#โ€ฌโ€ฌ โ€ซโ€ชprint7-:โ€ฌโ€ฌ โ€ซุง;) ุขโ€ชI3โ€ฌุก  ุง>โ€ช Gโ€ฌุงโ€ชู‹ j< #โ€ฌโ€ฌ โ€ซโ€ชF3J (54โ€ฌุฒ ุง>= ุงู… โ€ช 7page$โ€ฌุข>โ€ช( X ) # Gโ€ฌโ€ฌ โ€ซุฃูˆโ€ชprintali$โ€ฌโ€ฌ โ€ซ)โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ชF3J (55โ€ฌุฒ ุง>= ุงู… โ€ช 199$โ€ฌุข>โ€ช# Gโ€ฌโ€ฌ โ€ซโ€ชF3J S-4โ€ฌุฒ ุง>= ุงู… ุงโ€ช#0โ€ฌูˆู ุงโ€ช < %#โ€ฌุงโ€ช/Fโ€ฌโ€ฌ โ€ซโ€ชF3J (56โ€ฌุฒ ุง>= ุงู… โ€ช page198โ€ฌุข>โ€ช( / ) # Gโ€ฌโ€ฌ โ€ซุงโ€ช 0โ€ฌุ›"ูˆ;  โ€ช#JF1 GJโ€ฌู‡ < ุงโ€ชยญ0% 2cโ€ฌโ€ฌ โ€ซโ€ชF3J (57โ€ฌุฒ ุง>= ุงู… โ€ช pa%eโ€ฌุข>โ€ช( X ) # Gโ€ฌโ€ฌ โ€ซย ุง>ู„ ุงโ€ช#0โ€ฌูˆู โ€ช )%โ€ฌุงโ€ช.%#โ€ฌโ€ฌ

โ€ซโ€ช(58โ€ฌโ€ฌ โ€ซโ€ช(59โ€ฌโ€ฌ โ€ซโ€ช(60โ€ฌโ€ฌ โ€ซโ€ช(61โ€ฌโ€ฌ โ€ซโ€ช(62โ€ฌโ€ฌ โ€ซโ€ช(63โ€ฌโ€ฌ โ€ซโ€ช(64โ€ฌโ€ฌ โ€ซโ€ช(65โ€ฌโ€ฌ โ€ซโ€ช(66โ€ฌโ€ฌ โ€ซโ€ช(67โ€ฌโ€ฌ โ€ซโ€ช(68โ€ฌโ€ฌ โ€ซโ€ช(69โ€ฌโ€ฌ โ€ซโ€ช(70โ€ฌโ€ฌ โ€ซโ€ช(71โ€ฌโ€ฌ

โ€ซ)โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… โ€ช !pageโ€ฌุข>โ€ช# Gโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… @โ€ช pageโ€ฌุข>โ€ช( / ) # Gโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… โ€ช page#โ€ฌุข>โ€ช( / ) # Gโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… &โ€ช pageโ€ฌุข>โ€ช( / ) # Gโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… โ€ช page%โ€ฌุข>โ€ช( / ) # Gโ€ฌโ€ฌ โ€ซ)โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… โ€ช printโ€ฌุข>โ€ช# Gโ€ฌโ€ฌ โ€ซ)โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… โ€ช ANDโ€ฌุข>โ€ช# Gโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… โ€ช ENDIFโ€ฌุข>โ€ช( X ) # Gโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… โ€ช print7โ€ฌุข>โ€ช( / ) # Gโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… โ€ช print%โ€ฌุข>โ€ช( X ) # Gโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… โ€ช textprintโ€ฌุข>โ€ช( / ) # Gโ€ฌโ€ฌ โ€ซ)โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… โ€ช Remโ€ฌุข>โ€ช# Gโ€ฌโ€ฌ โ€ซ)โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… โ€ช Letโ€ฌุข>โ€ช# Gโ€ฌโ€ฌ โ€ซโ€ชF3Jโ€ฌุฒ ุง>= ุงู… โ€ช A-Bโ€ฌุข>โ€ช( X )# Gโ€ฌโ€ฌ

โ€ซุฅุฐุง ุงโ€ช

cโ€ฌุฉ  ุง>โ€ช Gโ€ฌุงโ€ช #โ€ฌู‡โ€ฌ โ€ซุฃู† โ€ช Jโ€ฌุฃ โ€ช#0%โ€ฌู ูˆุงโ€ช eโ€ฌุฃูˆ >))  ุงโ€ช#eMโ€ฌู ุฃูˆ ุงโ€ชMโ€ฌุฑู…โ€ฌ โ€ซุฃูˆ @)โ€ช  qโ€ฌุงโ€ช#eMโ€ฌู ูˆุงโ€ชMโ€ฌุฑู… ูˆโ€ชF3Jโ€ฌุฒ ูˆยœย  โ€ฌ โ€ซ  โ€ช Jโ€ฌุง>โ€ช Gโ€ฌุงโ€ช ยฌ #โ€ฌู†  โ€ช_ Fโ€ฌุ›ูˆ  ุชโ€ฌ โ€ซู‡ ) !โ€ช( & -$ -% - # - @ -โ€ฌโ€ฌ โ€ซุข โ€ช w^jJโ€ฌุงโ€ช( _ )I #โ€ฌุงโ€ชOโ€ฌูŠ โ€ช =Jโ€ฌู… โ€ช q%#โ€ฌุข) ุฃูˆโ€ฌ โ€ซุฃุขโ€ช < #jโ€ฌุข) ูˆุงโ€ช eโ€ฌุฉโ€ช.โ€ฌโ€ฌ โ€ซ โ€ช#0% Qc -:ยฏeโ€ฌู ุฃูŠ โ€ช#eโ€ฌู  โ€ช#eโ€ฌูˆู ุง)โ€ฌ โ€ซุง(โ€ช.JI)3โ€ฌโ€ฌ โ€ซู‡โ€ช ย…Oโ€ฌุงโ€ช#mโ€ฌูˆุท โ€ช 1 w) b^1โ€ฌุฏโ€ช 2โ€ฌุงโ€ช c)0โ€ฌูˆ ุฃ>โ€ชGโ€ฌโ€ฌ โ€ซุงโ€ช <FCQโ€ฌูˆุง>โ€ช Gโ€ฌุงโ€ช H #โ€ฌุงโ€ช #Cโ€ฌูˆุง ุงโ€ฌ

โ€ซโ€ช-2-โ€ฌโ€ฌ

โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ช:โ€ฌุง  ุงู… โ€ฌ


โ€ซโ€ชF3J (72โ€ฌุฒ ุง>= ุงู… โ€ช A_Bโ€ฌุข>โ€ช( / )# Gโ€ฌโ€ฌ โ€ซโ€ชF3J (73โ€ฌุฒ ุง>= ุงู… โ€ช Ali Ahmad$โ€ฌุข>โ€ช( X )# Gโ€ฌโ€ฌ โ€ซโ€ชF3J (74โ€ฌุฒ ุง>= ุงู… โ€ช LET$โ€ฌุข>โ€ช( X )# Gโ€ฌโ€ฌ โ€ซโ€ชF3J (75โ€ฌุฒ ุง>= ุงู… โ€ช LET154$โ€ฌุข>โ€ช( / )# Gโ€ฌโ€ฌ โ€ซโ€ชF3J (76โ€ฌุฒ ุง>= ุงู… โ€ช TXT%โ€ฌุข>โ€ช( / )# Gโ€ฌโ€ฌ โ€ซโ€ชF3J (77โ€ฌุฒ ุง>= ุงู… โ€ช C+B%โ€ฌุข>โ€ช( X )# Gโ€ฌโ€ฌ โ€ซโ€ช =J (78โ€ฌู… ุงโ€ช q%# " _ "I #โ€ฌุข) ุฃูˆ ุฃุขโ€ช < #jโ€ฌุข) ูˆุงโ€ช eโ€ฌุฉ ุข>โ€ช( / )# Gโ€ฌโ€ฌ โ€ซโ€ช (79โ€ฌุงโ€ช #โ€ฌุง;โ€ช#โ€ฌู‰ ู‡โ€ช Fโ€ฌุงโ€ชOโ€ฌูŠ โ€ช

/%z _ Jโ€ฌุฏูŠ ย†โ€ช( X )|0โ€ฌโ€ฌ โ€ซโ€ช (80โ€ฌุงโ€ช #โ€ฌุงโ€ช <#0โ€ฌู‡โ€ช Fโ€ฌุงโ€ชOโ€ฌูŠ โ€ช( / )<#e /%z _ Jโ€ฌโ€ฌ โ€ซโ€ช (81โ€ฌุงโ€ช #โ€ฌุงโ€ช |0Qโ€ฌู‡โ€ช Fโ€ฌุงโ€ชOโ€ฌูŠ โ€ช

/%z _ Jโ€ฌุฏูŠ ย†โ€ช( / )|0โ€ฌโ€ฌ โ€ซโ€ชF J 0 (82โ€ฌุน ุงโ€ช = <#e #โ€ฌู… ุงโ€ช2007( / )String # Mโ€ฌโ€ฌ โ€ซโ€ชF J 0 (83โ€ฌุน ุงโ€ช #โ€ฌุงโ€ช J w) ( % )   ยยœF1 |0Qโ€ฌุงโ€ช #โ€ฌุงโ€ช|0Qโ€ฌุ›โ€ฌ โ€ซูˆ   ) ! ( )โ€ช J wโ€ฌุงโ€ช #โ€ฌุง;โ€ช#โ€ฌู‰ ) โ€ช2008( /โ€ฌโ€ฌ โ€ซโ€ชF  # 99 (84โ€ฌุน ย†โ€ช( X )|0โ€ฌโ€ฌ โ€ซโ€ชF  /%z C$ (85โ€ฌุน โ€ช( X ) <#eโ€ฌโ€ฌ โ€ซโ€ช 1 ;J (86โ€ฌุง ุฏ โ€ชF  # 527674โ€ฌุน ย†โ€ช( X )|0โ€ฌโ€ฌ โ€ซโ€ช ยJ (87โ€ฌุงโ€ช #โ€ฌุง;โ€ช#โ€ฌู‰ ุงโ€ช#Cโ€ฌุฏโ€ช Ie ยฐยœ Singleโ€ฌุง=โ€ช #) ย‚Qโ€ฌุง` โ€ช( X )Doubleยฐโ€ฌโ€ฌ โ€ซโ€ช #J (88โ€ฌุงโ€ชF  page@ #โ€ฌุน ุง)) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ชF J 0 (89โ€ฌุน ุงโ€ชJ w)   ยยœF1 #โ€ฌุฑ ุง>โ€ช Gโ€ฌุงโ€ช( X )#โ€ฌโ€ฌ โ€ซโ€ชF J 0 (90โ€ฌุน ุงโ€ชz DF1 #โ€ฌุซ ย›โ€ช#โ€ฌู‚) โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ช (91โ€ฌุงโ€ช #โ€ฌุงโ€ช#โ€ฌู† ู‡โ€ช Fโ€ฌุงโ€ชM |)QJ #โ€ฌูŠ โ€ชFโ€ฌุน ุฃูŠ โ€ช J    _< ยยœF1 Sโ€ฌุง>โ€ช Gโ€ฌุงโ€ช #โ€ฌูˆโ€ช % < ย… J 01 GJ Sโ€ฌุงโ€ชJโ€ฌโ€ฌ โ€ซุงโ€ช H #โ€ฌุ›ูˆโ€ชF J 01 GJโ€ฌุน ุงโ€ชย„% #โ€ฌูˆู„ โ€ช( / )#) #P.1 )Dโ€ฌโ€ฌ โ€ซโ€ช  F3 (92โ€ฌุฑ โ€ชFโ€ฌุฒ ุงโ€ช $โ€ฌุงโ€ช "#โ€ฌู‡ ุงโ€ช#0โ€ฌูˆู ุง(โ€ช JI)3โ€ฌุงโ€ช#Qโ€ฌุฉ ูˆุง;โ€ช#โ€ฌุฉ ุงโ€ชMโ€ฌุฑู…  โ€ช 0โ€ฌุฅโ€ช 9 wโ€ฌูˆุงโ€ชF #โ€ฌุฒ) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช GJ (93โ€ฌุง@ุฑ ุฃ>ุก ุงโ€ช#โ€ฌุงุช < ุฃูŠ โ€ช H #%โ€ฌุฏุฉ  โ€ช 2โ€ฌุงโ€ช( / ) H #โ€ฌโ€ฌ โ€ซโ€ช (94โ€ฌุงโ€ช #โ€ฌุงโ€ช#โ€ฌู† โ€ช JI= qc< |)QJโ€ฌุงุช ุงโ€ช2003( X )<#0โ€ฌโ€ฌ โ€ซโ€ช (95โ€ฌุงโ€ช ^% ู‹JF 00ย† H$=234 )3โ€ฌุงโ€ช2004( X )ู‹JF ย™ย›@ ADD!="OMAR" )3โ€ฌโ€ฌ โ€ซโ€ช (96โ€ฌุงุฑุงุช ุงโ€ชF;1 %0โ€ฌู†  โ€ช /%zโ€ฌูˆุงโ€ช eโ€ฌุฃูˆ โ€ช #โ€ฌูˆุงโ€ช ย qc< eโ€ฌูˆโ€ชFDโ€ฌุฏ ุงโ€ชF #โ€ฌุฒ ุงโ€ช( X )%0โ€ฌโ€ฌ โ€ซโ€ช H1 (97โ€ฌุงุฑุฉ ุงโ€ชJ X=5/2 %0โ€ฌูˆูŠ โ€ช H1 Cโ€ฌุงุฑุฉ ุงโ€ช( X )X=5\2 %0โ€ฌโ€ฌ โ€ซโ€ช H1 (98โ€ฌุงุฑุฉ ุงโ€ชJ X%=5/2 %0โ€ฌูˆูŠ โ€ช H1 Cโ€ฌุงุฑุฉ ุงโ€ช( / )X=5\2 %0โ€ฌโ€ฌ โ€ซโ€ช F (99โ€ฌุฃุฑุฏ โ€ช ) H1โ€ฌุงโ€ชF;J cโ€ฌู†

ุฏ ย†โ€ช< |0โ€ฌู† = ู… ุง  ) \ ( ) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช H1 (100โ€ฌุงุฑุฉ ุงโ€ช X%=5/2 %0โ€ฌู‡โ€ช( / )2 Fโ€ฌโ€ฌ โ€ซโ€ช H1 (101โ€ฌุงุฑุฉ ุงโ€ช X=5\2 %0โ€ฌู‡โ€ช( / )2 Fโ€ฌโ€ฌ โ€ซโ€ช H1 (102โ€ฌุงุฑุฉ ุงโ€ช X=5/2 %0โ€ฌู‡โ€ช( / )2.5 Fโ€ฌโ€ฌ โ€ซโ€ช H1 (103โ€ฌุง) ุงโ€ช X=5.5/2 %0โ€ฌู‡โ€ช( X )3 Fโ€ฌโ€ฌ โ€ซโ€ช (104โ€ฌุงโ€ช c>Mโ€ฌุง โ€ช _Jโ€ฌุงโ€ช OC^ GD#โ€ฌุง) ุงโ€ช %0โ€ฌู‡ โ€ช $< -1-:โ€ฌุงโ€ชFMโ€ฌุงุณ ุฅู† ูˆโ€ช Dโ€ฌุช โ€ช -2-โ€ฌุงโ€ชMโ€ฌุณ โ€ช -3-โ€ฌุง`โ€ช#โ€ฌุจโ€ฌ โ€ซูˆุงโ€ช ยše w) cโ€ฌุงโ€ช c>Mโ€ฌุฃูŠ  ุงุฑ ุฅโ€ช wโ€ฌุง โ€ช -4-โ€ฌุงโ€ช ย3โ€ฌูˆุงโ€ช#โ€ฌุญ )โ€ช ยše wโ€ฌุงโ€ชc>Mโ€ฌโ€ฌ โ€ซ) โ€ช2005( /โ€ฌูุ›โ€ช2006โ€ฌูโ€ฌ โ€ซโ€ช (105โ€ฌุงโ€ช ยถ<;1 40/4+4)3โ€ฌุงโ€ช( X) 40/(4+4) )3โ€ฌโ€ฌ โ€ซโ€ช (106โ€ฌุงโ€ช ยถ<;1 60/2+4 )3โ€ฌุงโ€ช( / )(60/2)+4 )3โ€ฌโ€ฌ โ€ซโ€ช H1 (107โ€ฌุงุฑุฉ ุงโ€ช (3+4*2) ^2%0โ€ฌู‡โ€ช2003( / ) 121 Fโ€ฌโ€ฌ โ€ซโ€ช H1 (108โ€ฌุงุฑุฉ ุงโ€ช 3*(4+5)-6%0โ€ฌู‡โ€ช2004( / )21 Fโ€ฌโ€ฌ โ€ซโ€ช H1 (109โ€ฌุงุฑุฉ ุงโ€ช 5*(2+(5-2)*3)-45%0โ€ฌู‡โ€ช2005( / )10 Fโ€ฌโ€ฌ โ€ซโ€ช H1 (110โ€ฌุงุฑุฉ ุงโ€ช 2*(7-(3*3))-2%0โ€ฌู‡โ€ช2005( / )-6 Fโ€ฌโ€ฌ โ€ซโ€ช H1 (111โ€ฌุงุฑุฉ ุงโ€ช 3*(2+(5-3))-12 %0โ€ฌู‡โ€ช2006( / )#Cย† Fโ€ฌโ€ฌ โ€ซโ€ช H1 (112โ€ฌุงุฑุฉ ุงโ€ช 7*3/(3^2-(5-4)*2)%0โ€ฌู‡โ€ช2007( / )3 Fโ€ฌโ€ฌ โ€ซโ€ช 1 GJ (113โ€ฌุงโ€ช #) 5cโ€ฌุงโ€ช#โ€ฌู† โ€ช  Fโ€ฌุงุฑุฉ ุงโ€ช( / )F=3*(2+(2^2-3))-4 %0โ€ฌโ€ฌ โ€ซโ€ช-3-โ€ฌโ€ฌ

โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ช:โ€ฌุง  ุงู… โ€ฌ


( / )4096 Fโ€ซ( ู‡โ€ฌ3+1)^2/(3+1)^2^4 %0โ€ซ ุงุฑุฉ ุงโ€ฌH1 (114 2003( / )X!=17/2%0โ€ซ  ุงุฑุฉ ุงโ€ฌX โ€ซู†โ€ฌ#โ€ซ ุงโ€ฌ#) 8.5cโ€ซ ุงโ€ฌ1 GJ (115 ( / )19 Fโ€ซ ู‡โ€ฌ3^2*4+6/2-4*5 %0โ€ซ ุงุฑุฉ ุงโ€ฌH1 (116 ( / ) X!=1.0/3.0%0โ€ซ  ุงุฑุฉ ุงโ€ฌX โ€ซูŠโ€ฌ#;โ€ซ ุงโ€ฌ#) 0.3333333cโ€ซ ุงโ€ฌ1 GJ (117 "โ€ซุฏโ€ฌ#C โ€ซูŠโ€ฌ#โ€ซุน ุขโ€ฌF  #โ€ซู† ุงโ€ฌS " ( / ) X# =1.0/3.0%0โ€ซ  ุงุฑุฉ ุงโ€ฌX โ€ซู†โ€ฌ#โ€ซ ุงโ€ฌ#) 0.333333333333333cโ€ซ ุงโ€ฌ1 GJ (118 "ยฐ ` โ€ซูŠโ€ฌ#โ€ซุน ุขโ€ฌF  #โ€ซู† ุงโ€ฌS " ( / )โ€ซู‰โ€ฌ#@โ€ซ ุฃูŠ ) ุฃโ€ฌw) c>Mโ€ซ ุงโ€ฌP โ€ซุงุณโ€ฌFMโ€ซ ุงโ€ฌ$< ) (119 ( X ) "#โ€ซ ุงโ€ฌ$โ€ซ ุงโ€ฌ3 #โ€ซ ุงุฑ <  ุงโ€ฌwโ€ซ  ุง ุฅโ€ฌ%0โ€ซุงุก ุง)ุช ุงโ€ฌ#Dโ€ซ < ุฅโ€ฌc>Mโ€ซ( ุงโ€ฌ120 a+b X= โ€ซ ุงโ€ฌJ#3โ€ซ ย† ุงุฏ ุงโ€ฌ2JF0 (121 c+d ( / )X=(64)^1/3 โ€ซ" ู‡โ€ฌ#โ€ซ ุงโ€ฌ$โ€ซ ย† ุงโ€ฌwโ€ซ ุฅโ€ฌ3 64 X= โ€ซ ุงโ€ฌJ#3โ€ซ ย† ุงุฏ ุงโ€ฌ2JF0 (122 y โ€ซ" ู‡โ€ฌ#โ€ซ ุงโ€ฌ$โ€ซ ย† ุงโ€ฌwโ€ซุฅโ€ฌ X=3+ * b2โ€ซ ุงโ€ฌJ#3โ€ซ ย† ุงุฏ ุงโ€ฌ2JF0 (123 2+3

( X )X=a+b/c+d โ€ซ" ู‡โ€ฌ#โ€ซ ุงโ€ฌ$โ€ซ ย† ุงโ€ฌwโ€ซุฅโ€ฌ

( / ) X=3+(Y/(2+3))*b^2 ( / )Jโ€ซูˆุฑโ€ฌ#ยœ /โ€ซ ูˆโ€ฌJโ€ซ) ุง@ุฑโ€ฌD Let )D #1 (124 ( /) #  ย‚Q= let โ€ซ= ู… ุฑุฉโ€ฌ1 (125 " %jโ€ซ ุงโ€ฌGcโ€ซ ุงโ€ฌe < โ€ซ= ู…โ€ฌ1 โ€ซ) ุฅุฏ@ู„โ€ฌD โ€ซ ูˆู‡โ€ฌ1 โ€ซ ุฃูˆโ€ฌJI=1 โ€ซ" ุฃูŠโ€ฌ ( / ) M%#โ€ซ ุงโ€ฌwโ€ซ ุฅโ€ฌH1^โ€ซย‚ ุงโ€ฌQ=1โ€ซ ูˆโ€ฌM% #โ€ซ ุงโ€ฌwโ€ซ ุฅโ€ฌ1 ยฐยœโ€ซ^ ุฃโ€ฌ1 M%=M%+1 )3โ€ซ( ุงโ€ฌ126 ( X )a+b=x+y 00ย† โ€ซ) ุง ุงโ€ฌD #1 (127 ( / )X%=5/2 โ€ซ  ุงุฑุฉโ€ฌX% #โ€ซ ุงโ€ฌwโ€ซ ุฅโ€ฌ2 H1^โ€ซย‚ ุงโ€ฌQ=1 GJ (128 ( / )X%=6.6 โ€ซ  ุงุฑุฉโ€ฌX% #โ€ซ ุงโ€ฌwโ€ซ ุฅโ€ฌ7 H1^โ€ซย‚ ุงโ€ฌQ=1 GJ (129 2008( / )"to beor notto be"Fโ€ซ" ู‡โ€ฌto be"+"or not"+ "to be"<#0โ€ซ ุงุฑุฉ ุงโ€ฌH1 (130 2007โ€ซุ›โ€ฌ2004( / ) โ€ซู†โ€ฌ# # #J _< "#โ€ซ ุงโ€ฌ$โ€ซ <  ุงโ€ฌ#โ€ซุน ุงโ€ฌF J 01 GJ G  (131 ( / )12 c% A#โ€ซุฏุฉ  ุงโ€ฌJโ€ซ^ ุฒโ€ฌ1 A=A+12)3โ€ซ( ุงโ€ฌ132 2003( / ) B#) H1^โ€ซย‚ ุงโ€ฌQ=1โ€ซ ูˆโ€ฌ10c% A #โ€ซุฏุฉ  ุงโ€ฌJโ€ซ^ ุฒโ€ฌ1 B=A+10 )3โ€ซ( ุงโ€ฌ133 ( X )H #โ€ซ < ุฃูŠ ;ู† < ุงโ€ฌENDSUB )D ยยœโ€ซ; ูˆโ€ฌJ (134 ( X )endif )3โ€ซ ู‡ ุงโ€ฌH #โ€ซ ^ ู‡ ุงโ€ฌยฐcJ โ€ซ) ุงโ€ฌ3โ€ซ( ุงโ€ฌ135 ( / )ยถZ <  CJ S H1^โ€ซุงุฌ ุงโ€ฌ#@( )D โ€ซ ูˆู†โ€ฌ% H #โ€ซ( ุงโ€ฌ136 ( / )|0ย† โ€ซุนโ€ฌF  X #โ€ซ^ ุงู† ุงโ€ฌ1 Dim X as Integer )3โ€ซ( ุงโ€ฌ137 ( / )Integer X )3โ€ซ;ยš ุงโ€ฌ1 H #โ€ซ ุงโ€ฌJโ€ซ ุงโ€ฌ% < |0ย† โ€ซุนโ€ฌF  X#โ€ซุน ุงโ€ฌF J 0 (138 ( ) Currency X )3โ€ซ;ยš ุงโ€ฌ1 H #โ€ซ ุงโ€ฌJโ€ซ ุงโ€ฌ% < ) โ€ซุนโ€ฌF  X#โ€ซุน ุงโ€ฌF J 0 (139 480Cย† โ€ซุง;ุจโ€ฌ#.โ€ซ (ุงโ€ฌ/ ) ) โ€ซุนโ€ฌF  X #โ€ซ^ ุงู† ุงโ€ฌ1 Dim X as currency )3โ€ซ( ุงโ€ฌ140 ( / )amount!=34 )D < Gโ€ซ ุฃูŠ ุฑโ€ฌc< โ€ซ ูˆู†โ€ฌ% โ€ซูŠโ€ฌ#โ€ซ ุขโ€ฌwโ€ซ| ุฅโ€ฌ0Qโ€ซ ุงโ€ฌ/%jโ€ซ  ุงโ€ฌ2JF0% GD#โ€ซู… ุงโ€ฌFc> (141 "|0Qโ€ซุน ุงโ€ฌF  cโ€ซ ุงโ€ฌ2cJ โ€ซูŠโ€ฌ#;โ€ซ ุงโ€ฌ#โ€ซ" ุฃูŠ ุฃู† ุงโ€ฌ ( / )Zmโ€ซ ุงโ€ฌw) โ€ซุฏโ€ฌFDFโ€ซุฐุฌ ุงโ€ฌF^โ€ซ ุงโ€ฌw) H #โ€ซ ุงโ€ฌOC^1 H1 #P.% print  โ€ซ) ุงโ€ฌD โ€ซู…โ€ฌFc1 (142 cโ€ซ ุงโ€ฌ% >^โ€ซูƒ ุง< ุงโ€ฌ#1 ย #โ€ซ ุงโ€ฌC < J#โ€ซ    ุงโ€ฌprint y,x )D โ€ซ= ู…โ€ฌ1 (143 ( / )"โ€ซุง'ุชโ€ฌ#Cโ€ซ   ุงโ€ฌF3 โ€ซ"ุฃูŠโ€ฌ ( / )cโ€ซ ุงโ€ฌ% eโ€ซุงุบ ูˆุงโ€ฌ#< ย #โ€ซ ุงโ€ฌC < J#โ€ซ    ุงโ€ฌprint y;x )D โ€ซ= ู…โ€ฌ1 (144 2007( / ) J D #> wโ€ซู„ ุฅโ€ฌc โ€ซุงุชโ€ฌ# โ€ซ ูˆู†โ€ฌ% print )D โ€ซ= ู…โ€ฌ1 (145 ( X )โ€ซ @ุตโ€ฌ#> < # 2โ€ซ    ุขโ€ฌprint )D < โ€ซุงุชโ€ฌ#โ€ซ ุฃ>ุก ุงโ€ฌ% (,))ย†Cโ€ซ;ยš ุงโ€ฌ1 (146 ( X )print X.Y.Z )3โ€ซ = ู… ุงโ€ฌ#โ€ซ ุงโ€ฌC < Z,Y,X โ€ซุงุชโ€ฌ#โ€ซ(   ุงโ€ฌ147 ( / )print X โ€ซ ู‡โ€ฌX #โ€ซ ุง^>   ุงโ€ฌQโ€ซ( ุงโ€ฌ148 ( / )Print "A";A  โ€ซู† ุงโ€ฌF;1 โ€ซุงุบโ€ฌ#C% _^ )QC _  โ€ซุฏ _ ุฃโ€ฌFDโ€ซ ย ูˆโ€ฌA#โ€ซ(   ุงโ€ฌ149 ( / )โ€ซุฐุฌโ€ฌF^โ€ซ ุงโ€ฌw) 8 |0Qโ€ซ   ุง ุฏ ุงโ€ฌprint 8 )D โ€ซ= ู…โ€ฌ1 (150 ( / )โ€ซุฐุฌโ€ฌF^โ€ซ ุงโ€ฌw) 16 Fโ€ซ ูˆู‡โ€ฌJโ€ซุจ ุง ุฏโ€ฌ#ยœ 2ย†e   print 8*2 )D โ€ซ= ู…โ€ฌ1 (151  โ€ซุง  ุงู…โ€ฌ:โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ฌ

-4-


( / ) โ€ซุฐุฌโ€ฌF^โ€ซ ุงโ€ฌw) text1 ย‚^โ€ซย ุงโ€ฌ%# โ€ซุชโ€ฌJF0  ย› ^1 print text1.text )3โ€ซ( ุงโ€ฌ152 2004( X ) "#โ€ซ ุงโ€ฌ$โ€ซ ุงโ€ฌH #% < H"^โ€ซุงุฌ ุงโ€ฌ#@( โ€ซ ุฉโ€ฌeFโ€ซ ุงโ€ฌcJ#โ€ซ ุงโ€ฌFโ€ซ ู‡โ€ฌprint # Mโ€ซ( ุงโ€ฌ153 ( / ) H #โ€ซ ุงโ€ฌbzF REM )D โ€ซ= ู…โ€ฌ1 (154 ( / )H #โ€ซยš ุงโ€ฌ1โ€ซ ุขโ€ฌG>โ€ซยœ| ุงโ€ฌF REM )D โ€ซ= ู…โ€ฌ1 (155 ( / )H #โ€ซ ุงโ€ฌ2 cJ#ย› โ€ซุญโ€ฌ#Z REM )D โ€ซ= ู…โ€ฌ1 (156 ( / )H #โ€ซุฏุฉ < ุงโ€ฌFDFโ€ซุงุช ุงโ€ฌ#โ€ซุญ ุงโ€ฌ#m REM )D โ€ซ= ู…โ€ฌ1 (157 ( / )H #โ€ซุถ  ุงโ€ฌ#โ€ซยœ| ุงโ€ฌF REM )D โ€ซ= ู…โ€ฌ1 (158 (/) H #โ€ซ ุงโ€ฌJโ€ซ ุงโ€ฌ% < 2`CJโ€ซ ูˆโ€ฌH #โ€ซ ุงโ€ฌJP 2 โ€ซู†โ€ฌF;1 โ€ซุท ุงู†โ€ฌ#m% H #โ€ซ < ุฃูŠ ;ู† < ุงโ€ฌREM )D ยยœF1 (159 ( / )"|ยœFโ€ซ"ุงโ€ฌbzF โ€ซ= ู…โ€ฌ1 )D โ€ซ ูˆู‡โ€ฌOC^) )% #'โ€ซ ูˆโ€ฌH #โ€ซ ุงโ€ฌ2 w) #zย“1 S REM )D (160 2003( / )$โ€ซ ุงโ€ฌH #% 2@โ€ซุช ุฏุงโ€ฌc)1โ€ซุช ูˆโ€ฌ.eโ€ซ ุงโ€ฌ%โ€ซ < ุขโ€ฌRem )D โ€ซ= ู…โ€ฌ1 (161 ( / )Rem )D < โ€ซู‰โ€ฌ#@โ€ซ ุฃูˆ ุฃูŠ  ุฃโ€ฌ%#โ€ซ; ุง>= ุงู… ุง) ุงโ€ฌJ (162 2007( / ) "#โ€ซ ุงโ€ฌ$โ€ซ) ุงโ€ฌ% H #% bzF1 ;JRem )โ€ซุฏ )'( ุฃูˆ ุขโ€ฌ#Cโ€ซย‚ ุงโ€ฌQ^โ€ซ>= ุงู…   ุงโ€ฌ% (163 ( X ) <#e โ€ซุนโ€ฌF  X #โ€ซ^ ุงู† ุงโ€ฌ1 Dim X as currency )D (164 ( / )0ยœFโ€ซ ุงโ€ฌ23โ€ซ < ุงโ€ฌ%#โ€ซูˆู ุงโ€ฌ#0โ€ซ; ุง>ู„ ุงโ€ฌJ (165 ( / )X#โ€ซ ุงโ€ฌwโ€ซุฅโ€ฌ7 H1^โ€ซยš ุงุฑุฉ ูˆ  ุงโ€ฌeโ€ซ^ ุงโ€ฌ1 LET X=4+3 )D (166 A$ <#0โ€ซ ุงโ€ฌ#โ€ซ ุงโ€ฌwโ€ซ" ุฅโ€ฌAliAhmad" 1 ^1 A$="Ali"+"Ahmad" )D (167 ( / )">โ€ซ ุงโ€ฌ% q%โ€ซ" ุฃูŠ ) ุฑโ€ฌ

ยญjโ€ซุฃ>ย™) ุงุจ ุงโ€ฌ .2007( / ) โ€ซุงุฌ ุงุชโ€ฌ#@(โ€ซุฐุฌ )ุช ุง(ุฏ@ู„ ูˆุงโ€ฌF GQ% โ€ซู…โ€ฌFc "#โ€ซ ุงโ€ฌ$โ€ซ) ุงโ€ฌ% H #โ€ซ ุงโ€ฌ%โ€ซ ุขโ€ฌ2 (168 ( / )H #โ€ซุฉ ุงโ€ฌ#CZโ€ซุฐุฌ ูˆโ€ฌF^โ€ซ ุงโ€ฌยฐQ1 โ€ซ ุชโ€ฌF) w) โ€ซูŠโ€ฌF0J โ€ซูŠโ€ฌOโ€ซ ุงโ€ฌFโ€ซูˆุน ู‡โ€ฌ#mโ€ซ( ุงโ€ฌ169 ( / )โ€ซุฑู‚โ€ฌFโ€ซ ุงโ€ฌw) |ยœโ€ซ ูˆุงโ€ฌq=% ย…  โ€ซยš ุงู†โ€ฌ3J H #โ€ซ ุงโ€ฌGQ1โ€ซ ูˆโ€ฌOC^1 2 โ€ซ( ุฏุฉโ€ฌ170 .โ€ซูˆุนโ€ฌ#m "#โ€ซ ุงโ€ฌ$โ€ซ ุงโ€ฌ3 #โ€ซ <  ุงโ€ฌwJ H #โ€ซุฉ ุงโ€ฌ#CZ %โ€ซุฐุฌ ูˆุขโ€ฌF^โ€ซ ุงโ€ฌGQ1 โ€ซ" ุฃูŠ ุฃู†โ€ฌ ( / ) "#โ€ซ ุงโ€ฌ$โ€ซ ุงโ€ฌ2m1 ^ ู‹"c)1 #P.1 โ€ซ ู‡ ุงโ€ฌe<Sโ€ซ" ุฃูˆ ุงโ€ฌ#โ€ซ ุงโ€ฌZmโ€ซ ุฃูˆ ุงโ€ฌcโ€ซ ุงโ€ฌPDโ€ซุงโ€ฌFโ€ซ( ุงโ€ฌ171

.79 0Cย† โ€ซุง;ุจโ€ฌ

< โ€ซู†โ€ฌF;1  #.โ€ซุงโ€ฌ

( / )%โ€ซุงโ€ฌOD PDโ€ซ ูˆุงโ€ฌGQ1 < 

1 โ€ซ ุงโ€ฌG;0โ€ซ   ุฃุฒุฑุงุฑ ุงโ€ฌF3 w) โ€ซูŠโ€ฌF0J โ€ซุฏูˆุงุชโ€ฌMโ€ซ( ย†^ ูˆู‚ ุงโ€ฌ172 ( / )โ€ซุฐุฌโ€ฌF^โ€ซ ุงโ€ฌw)  F>#โ€ซย ุงโ€ฌcโ€ซย ุงโ€ฌD 2  โ€ซ= ู…โ€ฌJ qc< eโ€ซ ย†^ ูˆู‚ ุฃุฏูˆุงุช ูˆุงโ€ฌDFJ (173 ( / )H #โ€ซ ุงโ€ฌOC^1 H1 โ€ซุฑโ€ฌPร‚( โ€ซ= ู…โ€ฌJโ€ซ" ูˆโ€ฌ#โ€ซ ุงโ€ฌZmโ€ซ ุง(ย›ุฑุงุช ุงโ€ฌ% โ€ซ ุฅย›ุฑโ€ฌ#โ€ซ ุงุขโ€ฌFโ€ซุฐุฌ ู‡โ€ฌF^โ€ซ( ุงโ€ฌ174 ( / )โ€ซ ูˆุง= ู…โ€ฌH #โ€ซ ุงโ€ฌ% 2 Cโ€ซ ุงโ€ฌP< GJ โ€ซ ุงโ€ฌPDโ€ซุงโ€ฌFโ€ซ ุงโ€ฌFโ€ซุฐุฌ ู‡โ€ฌF^โ€ซ( ุงโ€ฌ175 ( / )ย‚"Q=โ€ซย ุงโ€ฌ%# โ€ซย„ุฑุฉ ุฃูˆโ€ฌCโ€ซ>= ุงู… ุงโ€ฌ% โ€ซุจโ€ฌF)โ€ซยš ุงโ€ฌe w) โ€ซุฐุฌ ุฃูˆ ุฃูŠ ุฃุฏุงุฉโ€ฌF^โ€ซ ุงโ€ฌe < G;0โ€ซ; ุงโ€ฌJ (176 ( / ) J D โ€ซูˆุนโ€ฌ#m < โ€ซ ) ุกโ€ฌNew Project# Mโ€ซ= ู… ุงโ€ฌJ (177 ( / ) GJ  โ€ซูˆุนโ€ฌ#m |C Open Project# Mโ€ซ= ู… ุงโ€ฌJ (178 ( X ) ยฐ)โ€ซยฏ ุงโ€ฌC0 Save Project# Mโ€ซ= ู… ุงโ€ฌJ (179 ( X )โ€ซูˆุนโ€ฌ#mโ€ซยฏ ุงโ€ฌC0 Save Form# Mโ€ซ= ู… ุงโ€ฌJ (180 ( / ) Dโ€ซ ุงู† ูˆโ€ฌGJ c% โ€ซุธโ€ฌCeSโ€ซ ย ุงโ€ฌJ D G>โ€ซ ุงโ€ฌ/01 ยฐ)โ€ซ" ุงโ€ฌJI="ยฏC0 Save Form as # Mโ€ซ= ู… ุงโ€ฌJ (181 ( / ) Dโ€ซ ุงู† ูˆโ€ฌGJ c% โ€ซุธโ€ฌCeSโ€ซ ย ุงโ€ฌJ D G>โ€ซ ุงโ€ฌ/01 โ€ซูˆุนโ€ฌ#mโ€ซ" ุงโ€ฌJI="ยฏC0 Save Project as # Mโ€ซ= ู… ุงโ€ฌJ (182 โ€ซูˆุนโ€ฌ#mโ€ซยฏ ุงโ€ฌC0 โ€ซ= ู…โ€ฌJ save project # Mโ€ซ^ ุงโ€ฌ% "โ€ซุฐุฌโ€ฌF^โ€ซ"ุงโ€ฌยฐ)โ€ซยฏ ุงโ€ฌC0 โ€ซ= ู…โ€ฌJ save file # Mโ€ซ( ุงโ€ฌ183 2007โ€ซุ›โ€ฌ2004( / ) ( / )F5 โ€ซุญโ€ฌC q` |1Cโ€ซ ุงโ€ฌeF โ€ซ"  @ู„โ€ฌ#โ€ซ ุงโ€ฌ$โ€ซ ุงโ€ฌH #โ€ซ ุงโ€ฌOC^ (184 # Mโ€ซ =ุฑ ุงโ€ฌRUN"cโ€ซ ูˆ  ุงโ€ฌRUN # โ€ซ" =ุฑ ุงโ€ฌ#โ€ซ" ุงโ€ฌcโ€ซ"  @ู„ ุงโ€ฌ#โ€ซ ุงโ€ฌ$โ€ซ ุงโ€ฌH #โ€ซ ุงโ€ฌOC^ (185 85 โ€ซ ุง;ุจโ€ฌ0Cย† #.โ€ซ ุงโ€ฌOC^โ€ซ ุงโ€ฌFcJโ€ซ ุงโ€ฌw) q`% $โ€ซุฏูˆุงุช ูˆุฐโ€ฌMโ€ซ ุงโ€ฌqJ#Z โ€ซ>= ุงู…โ€ฌ% OC^1 ;Jโ€ซ ( ูˆโ€ฌ/ ) Start ( / )view formโ€ซุฐุฌโ€ฌF^โ€ซุถ ุงโ€ฌ# โ€ซ ูˆุฑุฒโ€ฌview codeโ€ซุฉโ€ฌ#Cmโ€ซุถ ุงโ€ฌ# โ€ซ ู‡ ุฒุฑโ€ฌJโ€ซูˆุน  ุฒุฑโ€ฌ#mโ€ซู† ุฅย›ุฑ ุงโ€ฌF;J (186 ( / )โ€ซูˆุนโ€ฌ#mโ€ซ  @ู„ ุงย›ุฑ ุงโ€ฌH #โ€ซุฉ ุงโ€ฌ#Cmโ€ซุฐุฌ ุฃูˆ ุงโ€ฌF^โ€ซ ุงโ€ฌw) "โ€ซุถ" ุฃูˆ ุง(ย›ุนโ€ฌ# ;J (187  โ€ซุง  ุงู…โ€ฌ:โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ฌ

-5-


โ€ซโ€ช ยฏCe ^ (188โ€ฌุงโ€ช#mโ€ฌูˆุน โ€ช Jโ€ฌุงโ€ช $โ€ฌุงโ€ช "#โ€ฌุงโ€ช ู‹"c)1 Project1 G>Sโ€ฌูˆโ€ช( X ) ย…#1 ;J Sโ€ฌโ€ฌ โ€ซ)โ€ช(Xโ€ฌโ€ฌ โ€ซโ€ช ยฏCe ^ (189โ€ฌุง^โ€ชFโ€ฌุฐุฌ โ€ช Jโ€ฌุงโ€ช $โ€ฌุงโ€ช "#โ€ฌุงโ€ช ู‹"c)1 Form1 G>Sโ€ฌูˆโ€ชย…#1 ;J Sโ€ฌโ€ฌ โ€ซโ€ชF3J S (190โ€ฌุฒ โ€ช 1โ€ฌุง^โ€ชFโ€ฌุฐุฌ " ุฃูŠ ุง)โ€ช "ยฐโ€ฌูˆุงโ€ช#mโ€ฌูˆุน โ€ช C^%โ€ฌุงโ€ช( X )G>Sโ€ฌโ€ฌ โ€ซโ€ช (191โ€ฌุง  ุงุฏ ุง^โ€ชFโ€ฌุฐุฌ" ุฃูŠ ุง)โ€ช "ยฐโ€ฌู‡โ€ช ^% Frm Fโ€ฌุง  ุงุฏ ุงโ€ช#mโ€ฌูˆุน ู‡โ€ช2003 ( / ) Vbp Fโ€ฌุ›โ€ช2005โ€ฌุ›โ€ช2006โ€ฌุ›โ€ช2008โ€ฌโ€ฌ โ€ซโ€ช GJ (192โ€ฌุฅยœ< ุง)โ€ช" b0โ€ฌุฃูŠ ุงโ€ช  Sโ€ฌุงุฏ" โ€ช G>S ู‹"c)1 Frmโ€ฌุง)โ€ช ยฐโ€ฌูˆุง)โ€ช"b0โ€ฌุงโ€ช  Sโ€ฌุงุฏ"โ€ช G>S ู‹"c)1Vbpโ€ฌุงโ€ช#mโ€ฌูˆุน) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช #J (193โ€ฌุง)โ€ช#m Example.TXT ยฐโ€ฌูˆ ู‹ ;โ€ช )% ู‹%Fโ€ฌุงโ€ช $โ€ฌุงโ€ช( X ) "#โ€ฌโ€ฌ โ€ซโ€ชF3J (194โ€ฌุฒ ุง>= ุงู… ุงโ€ช#0โ€ฌูˆู ุงโ€ช  < %#โ€ฌุงโ€ช ยฐ)  $โ€ฌุง^โ€ชFโ€ฌุฐุฌ ูˆ )โ€ช ยฐโ€ฌุงโ€ช#mโ€ฌูˆุน) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช ^ (195โ€ฌุง>= ุงู… ุฃ โ€ช #โ€ฌุงโ€ช ยฐ)) save ยฏC0โ€ฌุฃูˆ ุงโ€ช#mโ€ฌูˆุน โ€ช GJโ€ฌุงโ€ช w) ยฏC0โ€ฌุงโ€ช#cโ€ฌุต ุงโ€ช ยš)Qโ€ฌูˆโ€ช; 2J 1 ;Jโ€ฌู† ุง=โ€ชJIโ€ฌโ€ฌ โ€ซูˆุขโ€ช $Oโ€ฌุฏโ€ช " )3 " 2โ€ฌุง=โ€ช) b1 ( / ) $>^J  ยše w) JIโ€ฌโ€ฌ โ€ซโ€ช ;J (196โ€ฌุงู† โ€ชF0Jโ€ฌูŠ ุงโ€ช#mโ€ฌูˆุน )โ€ช wโ€ฌุฃุขโ€ชF  #jโ€ฌุฐุฌ) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช ;J (197โ€ฌุงู† โ€ชF0Jโ€ฌูŠ ุงโ€ช#mโ€ฌูˆุน )โ€ช wโ€ฌุฃุขโ€ช ^ย†  #jโ€ฌูˆู‚ ุฃุฏูˆุงุช) โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ช (198โ€ฌุขโ€ช 2โ€ฌุฃุฏุงุฉ ุฃูˆ  โ€ช@ ย‚"Q@ ย%# Pโ€ฌุต โ€ช( / )_%โ€ฌโ€ฌ โ€ซโ€ช ^ย† DFJ (199โ€ฌูˆู‚ @โ€ช ย‚"Qโ€ฌูˆุงโ€ช =J qc< eโ€ฌู…  โ€ช ยD 2โ€ฌุงโ€ช ยcโ€ฌุงโ€ช w)  F>#โ€ฌุง^โ€ชFโ€ฌุฐุฌ) โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ช ย%# (200โ€ฌุง=โ€ช ย‚"Qโ€ฌู‡โ€ช Fโ€ฌุฑุฉ  ุฅย›ุฑ โ€ชF0Jโ€ฌูŠ )โ€ช   F3 wโ€ฌุง=โ€ช ย‚"Qโ€ฌุง โ€ช =1โ€ฌู… โ€ช c ย†@ #โ€ฌุ›โ€ฌ โ€ซูˆุขโ€ช 2โ€ฌุฃุฏุงุฉ"ุฃูŠ " โ€ช( / )_% ย†@ ย‚"Q@ ย%# Pโ€ฌโ€ฌ โ€ซโ€ช 2 (201โ€ฌุงู† โ€ชFcโ€ฌู… โ€ช OC^%โ€ฌุงโ€ช>% H #โ€ฌู„ ุงโ€ช ^) print# Mโ€ฌุงู† โ€ชFcโ€ฌู… โ€ช #%โ€ฌุง=ย† โ€ช autoRedrawโ€ฌโ€ฌ โ€ซุงโ€ช Fales0โ€ฌุฅโ€ช =J  ยฏe ( / ) Truee wโ€ฌู… ุงโ€ช % run # Sโ€ฌู„ โ€ช2003 printโ€ฌุ›โ€ช2005โ€ฌุ›โ€ช2006โ€ฌโ€ฌ โ€ซ"ุฃูŠ ^ ุง  )โ€ช wโ€ฌุง^โ€ชFโ€ฌุฐุฌ โ€ช =>%โ€ฌุงู… ุฃ โ€ช 2C1 ยš3J PRINT #โ€ฌู‡โ€ช ย…Oโ€ฌุง=ย†"โ€ฌ โ€ซโ€ช ^ autoRedraw ย†@ #1 ยš3J (202โ€ฌุฅโ€ชPร‚โ€ฌุฑ ุง^โ€ช ย%# w) H1โ€ฌุง^ย‚โ€ช( X )Text Boxโ€ฌโ€ฌ โ€ซโ€ช ย%# TEXT Box (203โ€ฌุง^ย‚ ู‡โ€ช Fโ€ฌุฑุฉ  ุฃุฏุงุฉ"ุฃูŠ " โ€ชFDFโ€ฌุฏุฉ < ย†^ ูˆู‚ ุงโ€ชMโ€ฌุฏูˆุงุช โ€ช =1โ€ฌู… )ุช ุง(ุฏ@ู„โ€ฌ โ€ซูˆุง(@โ€ช#โ€ฌุงุฌ) โ€ช2005( /โ€ฌโ€ฌ โ€ซโ€ช ย%# Label Box (204โ€ฌุงโ€ช ยฐย†Fโ€ฌู‡โ€ช Fโ€ฌุฑุฉ  ุฃุฏุงุฉ"ุฃูŠ " โ€ชFDFโ€ฌุฏุฉ < ย†^ ูˆู‚ ุงโ€ชMโ€ฌุฏูˆุงุช ูˆโ€ช =1โ€ฌู… โ€ชยฐย†Fโ€ฌโ€ฌ โ€ซุง^โ€ช " H1โ€ฌุฃูŠ โ€ช |ยœF1โ€ฌุง=โ€ชD#โ€ฌุช") โ€ช2005( /โ€ฌโ€ฌ โ€ซโ€ช (205โ€ฌุงโ€ช#โ€ฌุฒ ุง= ู… โ€ช |ยœFโ€ฌุง=โ€ชD#โ€ฌุช ู‡โ€ช2003( / ) Label Fโ€ฌุ›โ€ช2005โ€ฌโ€ฌ โ€ซโ€ช ;J (206โ€ฌุง>= ุงู… โ€ช ย%#โ€ฌุง^ย‚ โ€ช < TextBoxโ€ฌุฅ@โ€ช#โ€ฌุงุฌ ุง^"โ€ช w) Hโ€ฌุงโ€ช2004( / )Zmโ€ฌโ€ฌ โ€ซโ€ช ^ (207โ€ฌุฑ>โ€ช w) Label1 Gโ€ฌุง^โ€ชFโ€ฌุฐุฌ โ€ช #1 ;Jโ€ฌุง>_ ุงโ€ช.โ€ฌู‡โ€ช#โ€ฌูŠ โ€ช Caption ย†=%โ€ฌุฃ  ุง>_ < ุงโ€ช#โ€ฌุง โ€ชHโ€ฌโ€ฌ โ€ซ"ุฃูŠ ุงโ€ช2003( / ) Name ย†=% ย…#1 ;J " 3 #โ€ฌโ€ฌ โ€ซโ€ช ^ (208โ€ฌุฑ>โ€ช w) Text1 Gโ€ฌุง^โ€ชFโ€ฌุฐุฌ โ€ช #1 ;Jโ€ฌุง>_ ุงโ€ช.โ€ฌู‡โ€ช#โ€ฌูŠ โ€ช Text ย†=%โ€ฌุฃ  ุง>_ < ุงโ€ช#โ€ฌุง โ€ช"Hโ€ฌุงโ€ช" 3 #โ€ฌโ€ฌ โ€ซโ€ช2003 ( / )Name ย†=% ย…#1 ;Jโ€ฌโ€ฌ โ€ซ" ุฃูŠ ุฃู† @ย† โ€ช =1 nameโ€ฌู… โ€ช #โ€ฌุงโ€ช G>Sโ€ฌุงโ€ชOโ€ฌูŠ โ€ช _ 2 Jโ€ฌุงโ€ช" H #โ€ฌโ€ฌ โ€ซโ€ช =1 (209โ€ฌู… @ย† โ€ช ( Captionโ€ฌุก ^โ€ชFโ€ฌุงู† โ€ชMโ€ฌุฏุงุฉโ€ช( / )Labelโ€ฌโ€ฌ โ€ซโ€ช =1 (210โ€ฌู… @ย† โ€ช ( Textโ€ฌุก ^โ€ชFโ€ฌุงู† โ€ชMโ€ฌุฏุงุฉโ€ช( / )Textโ€ฌโ€ฌ โ€ซโ€ชF0 #1 ;J (211โ€ฌู‰ โ€ช ย%#โ€ฌุง^ย‚ ุงโ€ชF>#โ€ฌู… )โ€ช wโ€ฌุง^โ€ชFโ€ฌุฐุฌ ุฅโ€ช wโ€ฌุฃูŠ โ€ชF0โ€ฌู‰ โ€ช bJ#ย›  #@ร†โ€ฌุง=ย† โ€ช< textโ€ฌโ€ฌ โ€ซย†^ ูˆู‚ ุงโ€ชMโ€ฌุฏูˆุงุช) โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ชF0 #1 ;J (212โ€ฌู‰ โ€ช ย%#โ€ฌุง^ย‚ ุงโ€ชF>#โ€ฌู… )โ€ช wโ€ฌุง^โ€ชFโ€ฌุฐุฌ ุฅโ€ช wโ€ฌุฃูŠ โ€ชF0โ€ฌู‰ โ€ช bJ#ย›  #@ร†โ€ฌุง=ย† โ€ช< Captionโ€ฌโ€ฌ โ€ซย†^ ูˆู‚ ุงโ€ชMโ€ฌุฏูˆุงุช) โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ช (213โ€ฌุงุฐ ุขู† ุงโ€ชF0J H #โ€ฌูŠ )โ€ช ย%# wโ€ฌุง^ย‚ ุฃูˆ ูˆย†โ€ช ยš3< ยฐโ€ฌุฑ>โ€ช ย%# Gโ€ฌุง^ย‚ ุงูˆ โ€ช ย%#โ€ฌุงโ€ช ยฐย†Fโ€ฌุฃูˆ ุฃูŠ ุฃุฏุงุฉ ุฃ@โ€ช#โ€ฌู‰โ€ฌ โ€ซโ€ช 2โ€ฌุขโ€ช %โ€ฌุงโ€ช#Cmโ€ฌุฉ โ€ช Pโ€ฌูˆโ€ช OC^1โ€ฌุงโ€ช( / )H #โ€ฌโ€ฌ โ€ซโ€ช =1 (214โ€ฌู… @ย† โ€ชF # Back colorโ€ฌู† ุง=)โ€ชM Cโ€ฌูŠ ุฃุฏุงุฉ) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช =1 (215โ€ฌู… @ย† โ€ช ย‚"Q@ < G;0 Fontโ€ฌุง=โ€ช #1  qโ€ฌุงโ€ช G30โ€ฌุฃูˆ โ€ชFโ€ฌุน ุง=โ€ชM qโ€ฌูŠ ) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช =1 (216โ€ฌู… @ย† โ€ช ( Nameโ€ฌุก ุงโ€ช G>Sโ€ฌุงโ€ชM 3 #โ€ฌูŠ ) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช =1 (217โ€ฌู… @ย† โ€ช ( Textโ€ฌุก ^โ€ชFโ€ฌุงู† ^โ€ชFโ€ฌุฐุฌ) โ€ช( Xโ€ฌโ€ฌ โ€ซโ€ช #1 ;J (218โ€ฌุฃ>โ€ช Gโ€ฌุฃูŠ   ุงโ€ช G>Sโ€ฌุง)โ€ช ) "cโ€ฌุงโ€ช ( 3 #โ€ฌุฅโ€ช wโ€ฌุง>โ€ช bJ#ย›  #@ร† Gโ€ฌุง=ย†โ€ช( / )Nameโ€ฌโ€ฌ โ€ซโ€ช =1 ย†=) #m ; (219โ€ฌู… ุง^โ€ช % 2QC1 ; "." cโ€ฌุง>โ€ช Gโ€ฌุงโ€ชMโ€ฌุฏุงุฉ ูˆ ุง=ย†) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช ;J (220โ€ฌุงู† โ€ชF0Jโ€ฌูŠ ุง^โ€ชFโ€ฌุฐุฌ )โ€ช wโ€ฌุฃุขโ€ช ย‚ ย%#  #jโ€ฌุฃูˆ ุฃุขโ€ช ย%#  #jโ€ฌูˆย†โ€ช( / )ยฐโ€ฌโ€ฌ โ€ซโ€ชM (221โ€ฌูŠ  "ุฃูŠ ุฃุฏุงุฉ ุฃูˆ ุข""ุฃูˆ โ€ชFโ€ฌุฐุฌ

ุฉ @โ€ช 2j ย‚"Qโ€ฌุง^ย‚ ูˆุง)โ€ชFโ€ฌู†) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช-6-โ€ฌโ€ฌ

โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ช:โ€ฌุง  ุงู… โ€ฌ


< Caption †=‫ ا‬bJ#›  #@Æ ‫ى‬F0 ‫ أي‬w‫ذج إ‬F^‫ ا‬w) Command# M‫ى زر ا‬F0 #1 ;J (222 ( / )‚"Q=‫†^ وق ا‬ ( / )‫„رة‬C‫>= ام ا‬% ‫ذج‬F^‫ ا‬w) ‫ أو أي أداة‬°†F‫ ا^‚ أو ا‬%# G3e‫ و‬F 2J 1 ;J (223 ( / )OC^‫) ا‬e# ‫ و‬GQ‫) ا‬e# )e# "#‫ ا‬$‫ < ا‬DF1 (224 ( / )‚"Q=‫ ا‬%# bJ#›  GQ‫^ء ا‬z‫ ا=† < أ‬#1 ;J (225 ( / )"‫ة‬#Cm‫ ا‬%‫"أي آ‬#Z‫| ا‬J#Q‫ ا‬bJ#›  OC^‫^ء ا‬z‫ ا=† < أ‬#1 ;J (226 ( / )#eM‫ن ا‬F)‫ ا‬w‫إ‬Text1‚^‫ ا‬%# ‫ن‬F #1 ^1 Text1.Backcolor=VBRed )D (227 ( / )‫ذج‬F^‫ ا‬w) °†F‫ ا‬%# G>‫م ^ ر‬.^‫ ا‬2  ً"c)1 #P.J G>‫ ا‬F‫ ه‬label1 °†F‫ ا‬%# G>‫( أ‬228 "‫م‬.^‫ ا‬2  ً"c)1 #P.J "c)1 G>‫ ا‬P ‫" أي  أو اداة‬ Gz declaration ‫ و‬general );‫ ا‬w) ‫ي‬F0J ‫م إ›رًا‬.^‫ ا‬$) ‫ض‬#J View code‫ر‬I‫ ا‬w) #c ^ (229 ( / )form )‫ و=ر آ‬general )‫š آ‬3% ‫ا‬F‫ ا‬GP‫ زر ا‬#c‫ا‬

%‫ا‬#‫أ>™) اب ا‬ 2008‫؛‬2003( / ) $‫ ا‬H #% < # PQQ=1‫ (د@ل  و‬inputBox ‫= م ا ا‬1 (230 ( X )/%‫ا‬Fj) Gc‫ (د@ل ا‬inputBox ‫= م دا ا(د@ل‬1 (231 ( X )qc< J‫ ا د‬/%‫ا‬Fj‫= م < إد@ل ا‬1 inputBox ‫( دا‬232 2006( X )qc< <#0‫ ا‬/%‫ا‬Fj‫= م < إد@ل ا‬1 inputBox ‫( دا‬233 ( / )inputBox ‫  دا إد@ل‬#j‫ أآ‬w) ‫وع‬#m‫ي ا‬F0J ‫; ان‬J (234 ‫^ ارة‬% ‫ت‬D#=‫œ| ا‬F ًC†‫^ و‬1 Label1.caption= " š‫ع ا‬F3 "‫( ارة‬235 2003( / ) Reslt G>% ‚^‫ ا‬%# 215|0Q‫ ا‬/%j‫‚ ا‬Q=1 ^1 Reslt.text=215 name †@ ‫>= ام‬% Reslt w‫ إ‬text1  ‚^‫ ا‬%# 3 #‫ ا‬G>S‫ ا‬#1 G1 -:¯e $%  < P)%cJ  ‫""إ‬P^‫ ا‬3^‫ إ ارة "ا‬1 ‚^‫ ا‬%# ‫ى‬F0 # )D %‫( ^ إ دة آ‬236 2007( / )Text1.text= ""P^‫ ا‬3^‫"ا‬-: ‫ن‬F;1 "#‫ا‬ ( / )Text1 ‚^‫ ا‬%# < P ›‫  و‬1 ^1 Text1.text=km )3‫( ا‬237 ( / )_< J D  ‫ر‬PÂ‫ض إ‬# …‫ا‬F0  ‚^‫‡ †^ وق ا‬J#C1 ^1 Text1.text="" )3‫( ا‬238 ( / )00† print text1.text )D (239 ( / )00† Text1.text=inputBox("input number ") )D (240 ( X )00† )D ‫ ه‬name$="Ahmad" (241

 =‫أ>™) اب ا‬ ( / )#j‫  أو أآ‬% ‫ر‬c if-then-else\select case G;0‫ ا‬2D ‫= م‬1 (242 ‫) ا ^

م‬D w‫ إ‬OC^‫ ا‬2c^1 ‫ط أو‬#m‫ ا‬bc01 ^ ^ )D w‫ إ‬OC^‫ ا‬2c^1 if -then‫ر‬c‫) ا‬D (243 ( / )‫ط‬#m‫ ا‬bc01 ( X )if )D ‫ ^ ا>= ام‬J‫ ا@ر‬Endif )D (244 ( / )else )D w) if ‫ي رة‬F01 ‫وري ان‬#`‫(   ا‬245 23‫ ا‬OC "ali" <#0‫ ا‬/%z ‫وي‬1 S X <#0‫ ا‬#‫  ا‬/‫^ اذ آ‬1 if x$ <> "ali" then )3‫( ا‬246 ( / ) if , endif % ‫رة‬FQ0‫ا‬ $%  ‫ ( إ‬Y  ›„< S‫و إ‬X  ›„< Y   #‫ أآ‬X  /‫))إذا آ‬3‫ ا‬%‫( ^ إ دة آ‬247 if X>Y then -: ‫ن‬F;1 "#‫ا‬ Print x Else Print Y Endif

.‫ف‬2007( / ) ( / )‫ ي‬3%M‫š ا‬1#‫ ه < ا‬% 1„1  ^ ‫ى‬#@M‫< ا‬#e c‫  ا‬#‫< اآ‬#0‫ ا‬c‫ ا‬#1 (248 ( / )‫اض‬#'(‫)  دة ا‬D Select Case )D 1 (249  ‫ا  ام‬:‫  إ

اد رس ادة‬

-7-


ยญe โ€ซุทโ€ฌ#mโ€ซุงุจ ุงโ€ฌF3 "โ€ซ ุชโ€ฌ#Cโ€ซ"ุงโ€ฌ2"โ€ซ ุงโ€ฌ% โ€ซ

ุฉโ€ฌDFJ ยญe if-then  2P>โ€ซ ุฃโ€ฌSelect case โ€ซ>= ุงู…โ€ฌ% โ€ซ^ุก ุงย“ุงู„โ€ฌ% (250 ( / )โ€ซ ุงู‡โ€ฌeโ€ซุจ ุฅโ€ฌF>0โ€ซ ุงโ€ฌOC^J ( / )โ€ซ ุชโ€ฌ#Cโ€ซ ุฏ  ุงโ€ฌ% if-then )D  Select Case )D I1 (251 ( / )Fโ€ซ ุงโ€ฌGcโ€ซ   ุงโ€ฌ2@ J Sโ€ซ=ยถ ุง= ู… ูˆโ€ฌJ  ^ )J โ€ซ ุงโ€ฌ0โ€ซ@ุฑ ุงโ€ฌS โ€ซ= ู…โ€ฌ1 Select Case (252 ( / )40  JIJ Sโ€ซ ูˆโ€ฌ18  2cJ S # โ€ซู†โ€ฌF;J โ€ซ^ ุงู†โ€ฌ1 if (age >=18 and age <=40)then )D (253

J 3โ€ซ ุงโ€ฌc^โ€ซ <ู† ุงุฑุฉ ุงโ€ฌ00ย† 1โ€ซ ุงุฑโ€ฌ/โ€ซุฐุง ุขโ€ฌf<โ€ซุ›โ€ฌ1โ€ซ ุฑโ€ฌ% q%#) โ€ซ= ู…โ€ฌJ AND c^โ€ซ ุงโ€ฌq%โ€ซุงโ€ฌ#โ€ซ( ุงโ€ฌ254 .( / ) ย„@ โ€ซ ุฉโ€ฌJ D โ€ซู† ุงุฑุฉโ€ฌF;1 โ€ซูโ€ฌF< 00ย† #' โ€ซ ุงู‡ ุฃูˆ ุขู‡โ€ฌeโ€ซ ุฃโ€ฌ/โ€ซ ูˆุฅุฐุง ุขโ€ฌ00ย†

b0)โ€ซ ุงโ€ฌ#.โ€ซ ุงโ€ฌw^โ€ซยœ| ุงโ€ฌF ;J โ€ซ" ุฃูŠโ€ฌ40  JIJ S โ€ซ ุฃูˆโ€ฌ18  2cJ S # โ€ซู†โ€ฌF;J โ€ซ^ ุงู†โ€ฌ1 if (age >=18 Or age <=40)then )D (255 ( / )."/โ€ซย„ูŠ  ุขโ€ฌ% age โ€ซุฅุฏ@ู„โ€ฌ โ€ซ <ู† ุงุฑุฉโ€ฌ1โ€ซ ุงุฑโ€ฌeโ€ซ ุฃูˆ ุงโ€ฌ00ย† 1โ€ซ ุงุฑโ€ฌ/โ€ซุฐุง ุขโ€ฌf<โ€ซุ›โ€ฌ1โ€ซ ุงุฑโ€ฌ% q%#) โ€ซ= ู…โ€ฌJ OR c^โ€ซ ุงโ€ฌq%โ€ซุงโ€ฌ#โ€ซ( ุงโ€ฌ256 .( / ) ย™ย›@ 1โ€ซ  ุงุฑโ€ฌ2โ€ซ ุขโ€ฌ/โ€ซ ุฅุฐุง ุขโ€ฌSโ€ซู† @ย„ ุฅโ€ฌF;J Sโ€ซ ูˆโ€ฌ00ย† J 3โ€ซ ุงโ€ฌc^โ€ซุงโ€ฌ

b0)โ€ซ ุงโ€ฌ#.โ€ซ ุงโ€ฌw^โ€ซยœ| ุงโ€ฌF

eโ€ซ ุงโ€ฌbc0J โ€ซ ุงู†โ€ฌ2Mโ€ซ ุงโ€ฌw) ยš3J OR q%โ€ซุงโ€ฌ#โ€ซย› ุฃ  ^ ุง>= ุงู… ุงโ€ฌ#mโ€ซ ุงโ€ฌbc0J โ€ซยš ุงู†โ€ฌ3J AND q%โ€ซุงโ€ฌ#โ€ซ( ^ ุง>= ุงู… ุงโ€ฌ257 ( / )ย›#mโ€ซุงโ€ฌ ( / ) Case is >18 2;m% ยš;1 SELECT case โ€ซ>= ุงู…โ€ฌ% 18  #โ€ซ) ุฃุขโ€ฌ3โ€ซ ุงโ€ฌ%; (258 ( / ) Case 1 to 9 )3โ€ซ ุงโ€ฌ%;% $โ€ซ ูˆุฐโ€ฌselect case โ€ซ>= ุงู…โ€ฌ% 9 wโ€ซ ุงโ€ฌ1   โ€ซ; ุง@ุฑโ€ฌJ (259

โ€ซุฃ>ย™) ุงุจ ุงุฏุณโ€ฌ ( / )1 โ€ซุฏุฉโ€ฌJIโ€ซ ุงุฑ ุงโ€ฌc โ€ซู†โ€ฌF;J  ^ Jโ€ซ ุง@ุฑโ€ฌStep )D #1 (260 2005( / ) eโ€ซูˆูŠ ูˆุงโ€ฌ1 โ€ซุฉ ูˆโ€ฌF=โ€ซุงุถ ุงู† ุงโ€ฌ#<โ€ซ ุงโ€ฌG> FOR-Next c)0โ€ซุฉ < ุงโ€ฌF=โ€ซ ุงุฑ ุงโ€ฌc J 01 GJ G โ€ซ( ุฅุฐุงโ€ฌ261 2007( / )_JP โ€ซูˆูโ€ฌ#โ€ซุงุฑ ุงโ€ฌ#; Fox/next c)e โ€ซ= ู…โ€ฌ1 (262 ( / )โ€ซุงุชโ€ฌ# โ€ซ

ุฉโ€ฌ23โ€ซ   ุงโ€ฌF3 โ€ซ) ุฃูˆโ€ฌD โ€ซุงุฑโ€ฌ#; Fox/next c)e โ€ซ= ู…โ€ฌ1 (263 ( / )โ€ซุจโ€ฌF)โ€ซุฏุฉ ูˆุงโ€ฌJIโ€ซ ุงุฑ ุงโ€ฌc โ€ซ ูˆโ€ฌJP^โ€ซ ูˆุงโ€ฌJโ€ซ ุง ุงโ€ฌ2โ€ซ ุฏโ€ฌJ 01 ยš3J For/next c)e โ€ซ( ^ ุง>= ุงู…โ€ฌ264 ( X )For โ€ซ ^ ุง>= ุงู… ุฑุฉโ€ฌJโ€ซ ุง@ุฑโ€ฌnext )D (265 ( / ) c)0โ€ซ ุงโ€ฌ2โ€ซ ุฏโ€ฌw) #โ€ซ ุงโ€ฌ1 โ€ซูˆุทโ€ฌ#Z b^1 โ€ซยš ุงู†โ€ฌ3J (266 โ€ซุฏุฉโ€ฌJI% 9 โ€ซ ุฅโ€ฌ1  โ€ซ ุงุกโ€ฌ%โ€ซ ุงโ€ฌnextโ€ซ ูˆโ€ฌfor % โ€ซุฑุฉโ€ฌFQ0โ€ซ ุงโ€ฌ23โ€ซ ุงโ€ฌOC^1 ^1 FOR K=1 TO 9 Step 2 )3โ€ซ( ุงโ€ฌ267 2008( / )"9 wโ€ซ ุฅโ€ฌ1 % โ€ซุฑุฉโ€ฌFQ0โ€ซ ุงโ€ฌJโ€ซุฏโ€ฌ#Cโ€ซุฉ "ุฃูŠ ุง(

ุงุฏ ุงโ€ฌ# 2โ€ซ < ุขโ€ฌ2 โ€ซ ุงุฑโ€ฌc% k ( X ) 00ย† for I =3 to 5 step -1 )D (268 ( X )00ย† for I =-3 to -6 step 1 )D (269 ( / )00ย† for I =-3 to -6 step -1 )D (270 ( / ) 00ย† for I =-6 to -3 step 1 )D (271 ( / )Dโ€ซ ุง=ุฑโ€ฌGz ) โ€ซ ุง ุง@) ุขโ€ฌc)0โ€ซ ุงโ€ฌOC^1 GJ _< H #โ€ซ < ุงโ€ฌDโ€ซ ุฏุง@) ูˆ@ุฑโ€ฌc)e โ€ซุฏโ€ฌFDโ€ซ ูˆโ€ฌe < (272 โ€ซู†โ€ฌF;J โ€ซุท  "ุฃูŠ ุงู†โ€ฌ#Z bc01 ย› โ€ซุงุชโ€ฌ# โ€ซ

ุฉโ€ฌ2D   F3 โ€ซ) ุฃูˆโ€ฌD โ€ซุงุฑโ€ฌ#; Do while )D โ€ซ= ู…โ€ฌ1 (273 ( / )"|0ย† โ€ซุทโ€ฌ#mโ€ซุงโ€ฌ  โ€ซุทโ€ฌ#Z bc0J we โ€ซุงุชโ€ฌ# โ€ซ

ุฉโ€ฌ2D   F3 โ€ซ) ุฃูˆโ€ฌD โ€ซุงุฑโ€ฌ#; Do until )D โ€ซ= ู…โ€ฌ1 (274 ( / )"ย„@ โ€ซุทโ€ฌ#mโ€ซู† ุงโ€ฌF;J โ€ซ"ุฃูŠ ุงู†โ€ฌ ( / )|0ย† โ€ซุทโ€ฌ#mโ€ซ_ ุฅุฐุง ุขู† ุงโ€ฌJPโ€ซ ูˆโ€ฌ# Mโ€ซ ุงโ€ฌJโ€ซ ุงโ€ฌ% % โ€ซุงโ€ฌFโ€ซ ุงโ€ฌ23โ€ซ ุงโ€ฌOC^1 GJ do while # โ€ซ( ^ ุง>ู„ ุฃโ€ฌ275 Privte sub form-load() :โ€ซู†โ€ฌF;J for-nextc)e โ€ซ>= ุงู…โ€ฌ% Privte sub form-load() H #โ€ซ ุงโ€ฌ%โ€ซ( ^ ุขโ€ฌ276 C=1 Do while (c<=12) Print c C=c+1 Loop End sub

For c=1 to 12 step 1 Print c Next c End sub

 โ€ซุง  ุงู…โ€ฌ:โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ฌ

-8-

.โ€ซูโ€ฌ2007( / )


X#โ€ซ ย› ุงู†  ุงโ€ฌloop โ€ซ ูˆโ€ฌDo while % โ€ซุฑุฉโ€ฌFQ0โ€ซ ุงโ€ฌ23โ€ซ ุงโ€ฌOC ^1 Do while (X<=12) )3โ€ซ( ุงโ€ฌ277 ( / )12 โ€ซูˆูŠโ€ฌJ โ€ซ  ุฃูˆโ€ฌ#ย†โ€ซุฃโ€ฌ ( / )|0ย† #' โ€ซุทโ€ฌ#mโ€ซ_ ุฅุฐุง ุขู† ุงโ€ฌJPโ€ซ ูˆโ€ฌ# Mโ€ซ ุงโ€ฌJโ€ซ ุงโ€ฌ% % โ€ซุงโ€ฌFโ€ซ ุงโ€ฌ23โ€ซ ุงโ€ฌOC^1 GJ do until # โ€ซ( ^ ุง>ู„ ุฃโ€ฌ278 X#โ€ซ|  ุงโ€ฌQ1 we loop โ€ซ ูˆโ€ฌDo until % โ€ซุฑุฉโ€ฌFQ0โ€ซ ุงโ€ฌ23โ€ซ ุงโ€ฌOC ^1 Do until (X >12) )3โ€ซ( ุงโ€ฌ279 ( / )12 #โ€ซุฃุขโ€ฌ Fโ€ซ( ู‡โ€ฌwe OC) do until c)e < โ€ซุทโ€ฌ#mโ€ซ^ ุงโ€ฌ% โ€ซุงุฑโ€ฌ#>โ€ซุท ุงโ€ฌ#Z Fโ€ซ ย›(ู‡โ€ฌOC)do while c)e < โ€ซุทโ€ฌ#mโ€ซ( ุงโ€ฌ280 2007( / )ยฐF1 โ€ซุทโ€ฌ#Z ( / ) I=I+2 ยš;1 Do while c)e < I #) 1F@ โ€ซ ุงุฑโ€ฌc โ€ซู„โ€ฌc (281 2Q01 G ย› $)1 2ย†โ€ซ| ูˆุงโ€ฌQ1 (ย›-OC) โ€ซุฑุงย… ^ ุง>ู„โ€ฌFโ€ซ ุง ุขโ€ฌw) 2Q01 we $)1 2ย†โ€ซ) ูˆุงโ€ฌD (282 ( / )ย…โ€ซุฑุงโ€ฌFโ€ซ ุง ุขโ€ฌw)

( / )_JP โ€ซูˆูโ€ฌ#โ€ซ_ ูˆุงโ€ฌJP โ€ซูˆูโ€ฌ# #โ€ซุงุฑ ุงโ€ฌ#; โ€ซ= ู…โ€ฌ1 do-while/do โ€“until c)e (283 ( X )Do until c)0 Jโ€ซ ุง@ุฑโ€ฌLoop )D #1 (284 FOR c)e wโ€ซุน ุฅโ€ฌFD#โ€ซุฏุฉ ูˆุงโ€ฌJIโ€ซ ุงุฑ ุงโ€ฌc w) โ€ซ^ุกู‹ุงโ€ฌ% #โ€ซุฏุฉ  ุงโ€ฌJโ€ซ^ ุฒโ€ฌ1 NEXT )D -:ยฏe C ร‹ร‹ร‹c)0โ€ซูŠ ุงโ€ฌFร‹ร‹ร‹01 โ€ซยš ุฃู†โ€ฌร‹ร‹ร‹3J $ร‹ร‹ร‹โ€ซ ุฐโ€ฌwร‹ร‹ร‹) โ€ซุกู‹ุงโ€ฌร‹ร‹ร‹^%โ€ซ ูˆโ€ฌdo-until โ€ซ ุฃูˆโ€ฌdo-while ร‹ร‹ร‹c)0โ€ซ ุงโ€ฌwร‹ร‹ร‹โ€ซุน ุฅโ€ฌFร‹ร‹ร‹D#โ€ซ ุงโ€ฌร‹ ร‹^1 LOOP ร‹ร‹ร‹)D . c)0โ€ซู ุงโ€ฌcJ( โ€ซุทโ€ฌ#Z โ€ซุฏุฉ ุฃูˆโ€ฌJIโ€ซ ุงุฑ ุงโ€ฌc โ€ซ ุฏโ€ฌw) do-until โ€ซ ุฃูˆโ€ฌdo-while ."ู‹"โ€ซ ุฏุงโ€ฌP) โ€ซ ุฏโ€ฌSโ€ซ; ุงโ€ฌJ S โ€ซ ุ› "ุฃูŠโ€ฌqc< _JP โ€ซู…โ€ฌF)โ€ซุงุฑ ุงโ€ฌ#; FOR/NEXT c)e โ€ซ= ู…โ€ฌ1 -

ย%โ€ซุฃ>ย™) ุงุจ ุงโ€ฌ   F3 w) โ€ซูŠโ€ฌF01 Ram "#โ€ซุฉ ุงโ€ฌ#โ€ซุงุขโ€ฌOโ€ซ" < ุงโ€ฌJ=โ€ซุงย"ุงโ€ฌFโ€ซ   ุงโ€ฌF3  โ€ซ< ู‡ ุฑุฉโ€ฌFCQโ€ซ( ุงโ€ฌ285 ( / ) . eโ€ซ ูˆุงโ€ฌG>โ€ซ ุงโ€ฌ/01 โ€ซุนโ€ฌF^โ€ซ ุงโ€ฌC  โ€ซุงุชโ€ฌ 2006โ€ซุ›โ€ฌ2005โ€ซุ›โ€ฌ2004( / ) eโ€ซ ูˆุงโ€ฌG>โ€ซ ุงโ€ฌ/01โ€ซ ูˆโ€ฌeโ€ซุน ูˆุงโ€ฌF โ€ซ   ุงุช ุฐุงุชโ€ฌF3  โ€ซ< ู‡ ุฑุฉโ€ฌFCQโ€ซ( ุงโ€ฌ286 ( / )<FCQโ€ซ < ุงโ€ฌ/ย“ 2;m% โ€ซ ุงุชโ€ฌJI=1 GJ (287 2004( / )"#โ€ซุฉ ุงโ€ฌ#โ€ซุงุขโ€ฌOโ€ซ< < ุงโ€ฌFCQ) ยยœโ€ซุงโ€ฌF โ€ซุงย ุฃูˆโ€ฌF โ€ซ

ุฏโ€ฌI30 Dim )D โ€ซ= ู…โ€ฌ1 (288 ( / )โ€ซ ุงุฏูŠโ€ฌ#โ€ซ ุงโ€ฌG>โ€ซ ุงโ€ฌ1 โ€ซูˆุทโ€ฌ#Z C <FCQโ€ซ ุงโ€ฌG>โ€ซ ุงโ€ฌ1 w) b^J (289 ( / ) <FCQโ€ซ ุงโ€ฌ#ย†^ G>% <FCQโ€ซ ุงโ€ฌP^ โ€ซู†โ€ฌF;1 โ€ซุงุช ุงโ€ฌ#โ€ซ ุงโ€ฌw1 (290 ( / )<FCQ <"_1#1 โ€ซยœ_ "ุฃูŠโ€ฌF bJ#ย›  <FCQโ€ซ" < ุงโ€ฌ# โ€ซ"ุฃูŠโ€ฌ#Q^ โ€ซ ุฃูŠโ€ฌwโ€ซู„ ุฅโ€ฌFย†Fโ€ซ; ุงโ€ฌJ (291 ( / )qc< eโ€ซุฏ ูˆุงโ€ฌF โ€ซ ุฃูˆโ€ฌqc< eโ€ซ ูˆุงโ€ฌยฐย†  โ€ซู†โ€ฌF;1 โ€ซ ุง ู‡ ุงโ€ฌJโ€ซุฏโ€ฌeโ€ซ< ุฃโ€ฌFCQโ€ซ( ุงโ€ฌ292 ( / )โ€ซ  ุฉโ€ฌMโ€ซู ูˆุงโ€ฌFCQโ€ซ   ุงโ€ฌF3  โ€ซู†โ€ฌF;1 โ€ซ^" ุง ู‡ ุงโ€ฌjโ€ซ< ุงโ€ฌFCQโ€ซ( ุงโ€ฌ293 w) day G>% โ€ซ ุงโ€ฌJโ€ซุฏโ€ฌeโ€ซ< ุฃโ€ฌFCQ < โ€ซุฏโ€ฌFDFโ€ซ ุงโ€ฌ4 ยFโ€ซู‰ ุงโ€ฌF0  ย› ^1 print day (4) )3โ€ซ( ุงโ€ฌ294 ( / )โ€ซุฐุฌโ€ฌF^โ€ซุงโ€ฌ <FCQ < โ€ซุฏโ€ฌFDFโ€ซ ุงโ€ฌ3 ยFโ€ซ ุงโ€ฌwโ€ซ^ ุฅุฏ@ู„  ุฅโ€ฌ1 day (3)=inputbox("input name day") )3โ€ซ( ุงโ€ฌ295 ( / )day$ G>% โ€ซ ุงโ€ฌJโ€ซุฏโ€ฌeโ€ซุฃโ€ฌ 6 ยFโ€ซ< "ุง=" < ุงโ€ฌ#0โ€ซ ุงโ€ฌ/%jโ€ซ " ุงโ€ฌJI=1 โ€ซย‚"ุฃูˆโ€ฌQ=1 ^1 LET day (6)= "=โ€ซ) "ุงโ€ฌ3โ€ซ( ุงโ€ฌ296 ( / )day G>% โ€ซ ุงโ€ฌJโ€ซุฏโ€ฌeโ€ซ< ุฃโ€ฌFCQโ€ซุฏ < ุงโ€ฌFDFโ€ซุงโ€ฌ ( / )Jโ€ซูˆุฑโ€ฌ3 Jโ€ซุฏโ€ฌF < <FCQโ€ซ^ ย›  ุงโ€ฌ1 Print n(i),b(i) )3โ€ซ( ุงโ€ฌ297 ยFโ€ซ < ุงโ€ฌ41 |0Qโ€ซ ุงโ€ฌ/%jโ€ซ " ุงโ€ฌJI=1 โ€ซย‚"ุฃูˆโ€ฌQ=1 ^1 LET N(4,3)=41 )3โ€ซ( ุงโ€ฌ298 ( / )N G>% J % โ€ซ< ุฐุงุชโ€ฌFCQ) 3โ€ซุฏโ€ฌFโ€ซ ุงโ€ฌ4 ยฐQโ€ซุฏุฉ < ุงโ€ฌFDFโ€ซ"ุฃูŠ ุง=)" ุงโ€ฌ โ€ซ< ุฐุงุชโ€ฌFCQ) 3โ€ซุฏโ€ฌFโ€ซ ุงโ€ฌ4 ยฐQโ€ซุฏุฉ < ุงโ€ฌFDFโ€ซย "ุฃูŠ ุง=)" ุงโ€ฌFโ€ซู‰ ุงโ€ฌF0  ย› ^1 print N(4,3))3โ€ซ( ุงโ€ฌ299 ( / )โ€ซุฐุฌโ€ฌF^โ€ซ ุงโ€ฌw) N G>% J % โ€ซ< ุฐุงุชโ€ฌFCQ) 3โ€ซุฏโ€ฌFโ€ซ ุงโ€ฌ4 ยฐQโ€ซุฏ < ุงโ€ฌFDFโ€ซย ุงโ€ฌFโ€ซ ูˆย›   ุงโ€ฌ1 ^1 text1.text=N(4,3) )3โ€ซ( ุงโ€ฌ300 ( / )text1 ย‚ ย%# w) N G>% J % ( / ) n "^jโ€ซ< ุงโ€ฌFCQ) ย%โ€ซุงโ€ฌ#โ€ซ ุงโ€ฌยฐQโ€ซ ุงโ€ฌ#ย†^  ย› ^1 print n(4,j) )3โ€ซ( ุงโ€ฌ301 ( / ) n "^jโ€ซ< ุงโ€ฌFCQ) jโ€ซุฏ ุงโ€ฌFโ€ซ ุงโ€ฌ#ย†^  ย› ^1 print n(I,2) )3โ€ซ( ุงโ€ฌ302  โ€ซุง  ุงู…โ€ฌ:โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ฌ

-9-


(/)"โ€ซ  ุฉโ€ฌMโ€ซู ูˆุงโ€ฌFCQโ€ซ   ุงโ€ฌF3 w) โ€ซูŠโ€ฌF01 โ€ซ ุฐุงุช ุฏ)"ุฃูŠโ€ฌPM G>Sโ€ซ ุงโ€ฌ$O% J โ€ซ< ุฐุงุช ุงโ€ฌFCQโ€ซ ุงโ€ฌw1 (303 ( / )โ€ซ ุงโ€ฌwโ€ซ^"  ุงุฑ ุฅโ€ฌjโ€ซ< ุงโ€ฌFCQโ€ซ  ุฉ < ุงโ€ฌMโ€ซย… ุงโ€ฌ31โ€ซู† ุงโ€ฌF;1 โ€ซ( ุฏุฉโ€ฌ304 ( / )Jโ€ซูˆุฑโ€ฌ#ยœ )D <FCQโ€ซ ุงโ€ฌI30 Dim )D #1 (305 /)<FCQโ€ซ ุงโ€ฌ#ย†^ โ€ซ 

ุฏโ€ฌ#โ€ซูˆูŠ ุฃูˆ ุฃุขโ€ฌJ <FCQ < ยโ€ซุงโ€ฌFโ€ซู†

ุฏ ุงโ€ฌF;J โ€ซยš ุงู†โ€ฌ3J <FCQ) ยโ€ซุงโ€ฌF I3e ^ (306 ( / )โ€ซู†โ€ฌ# โ€ซุนโ€ฌF  โ€ซู†โ€ฌF;1 <FCQโ€ซุน ุงโ€ฌF J 01 โ€ซ( ^

ู…โ€ฌ307 โ€ซุนโ€ฌF  โ€ซ" ูˆู‡โ€ฌ#โ€ซุฉ ุงโ€ฌ#โ€ซุงุขโ€ฌOโ€ซ < ุงโ€ฌn G>% <FCQ) ยโ€ซุงโ€ฌF 10 I30% โ€ซู…โ€ฌFc1 Dim n(10) as integer )3โ€ซ( ุงโ€ฌ308 2008( / )integer |0Qโ€ซุงโ€ฌ ( / )โ€ซู†โ€ฌ# โ€ซุนโ€ฌF  โ€ซ" ูˆู‡โ€ฌ#โ€ซุฉ ุงโ€ฌ#โ€ซุงุขโ€ฌOโ€ซ < ุงโ€ฌn G>% <FCQ) ยโ€ซุงโ€ฌF 33 I30% โ€ซู…โ€ฌFc1Dim n(33) )3โ€ซ( ุงโ€ฌ309 2003 ( X ) ยš>0โ€ซุฉ ุงโ€ฌ#โ€ซู† < ุฐุงุขโ€ฌ# โ€ซุนโ€ฌF  A G>% <FCQ) ยœF I30% โ€ซู…โ€ฌFc1 dim A (1,1) )D (310 ( / )โ€ซ  ุฉโ€ฌMโ€ซู <

ุฏ ุงโ€ฌFCQโ€ซุจ

ุฏ ุงโ€ฌ#`% โ€ซู…โ€ฌFc โ€ซ^" ุงโ€ฌjโ€ซ< ุงโ€ฌFCQโ€ซุงย ุงโ€ฌF โ€ซ<

ุฏโ€ฌ# (311 "#โ€ซุฉ ุงโ€ฌ#โ€ซุงุขโ€ฌOโ€ซ < ุงโ€ฌmatrix G>% <FCQ) ยโ€ซุงโ€ฌF 12 I30% โ€ซู…โ€ฌFc1 Dim matrix(3,4) as integer )3โ€ซ( ุงโ€ฌ312 2006()integer |0Qโ€ซุน ุงโ€ฌF  โ€ซ ุฃ  ุฉ ูˆู‡โ€ฌ4โ€ซู ูˆโ€ฌFCย† 3 w) โ€ซูŠโ€ฌF01 โ€ซูŠโ€ฌF01 "#โ€ซุฉ ุงโ€ฌ#โ€ซุงุขโ€ฌOโ€ซ < ุงโ€ฌnam G>% <FCQ) ยโ€ซุงโ€ฌF 20 I30% โ€ซู…โ€ฌFc1 Dim nam(4,5) as string )3โ€ซ( ุงโ€ฌ313 2007()string <#e โ€ซุนโ€ฌF  โ€ซ ุฃ  ุฉ ูˆู‡โ€ฌ5โ€ซู ูˆโ€ฌFCย† 4 w)

  F3 w) )โ€ซ ุงโ€ฌC โ€ซุงุกโ€ฌ#Dโ€ซุจ ุฅโ€ฌF)โ€ซู† ุงโ€ฌF;J  ^ โ€ซุงุชโ€ฌ#โ€ซ<ุช  ุงโ€ฌFCQโ€ซ ุง>= ุงู… ุงโ€ฌ2`CJ (314 ( / )#jโ€ซุงุช ุขโ€ฌ#โ€ซ ูˆ

ุฏ ุงโ€ฌeโ€ซุน ูˆุงโ€ฌF  โ€ซุงุชโ€ฌ#โ€ซุงโ€ฌ โ€ซ ู‹ุงโ€ฌD โ€ซ ูˆุฏโ€ฌ0 |0Qโ€ซุน ุงโ€ฌF^โ€ซู† ุงโ€ฌS |0Qโ€ซุน ุงโ€ฌF^โ€ซ  ุงโ€ฌSู‹ % <#e โ€ซุนโ€ฌF  ยฐ1Pโ€ซ< ุฃุฑู… ุงโ€ฌFCQ  โ€ซ ุง( ู†โ€ฌ2`CJ (315 ( / )32767  _<  #โ€ซ ุฃุขโ€ฌJI1 S ( / ) โ€ซุนโ€ฌF^โ€ซ ุงโ€ฌC  #jโ€ซ< ุฃูˆ ุฃุขโ€ฌFCQ  โ€ซ ยฌ ู†โ€ฌdim )D โ€ซ; ุง>= ุงู…โ€ฌJ (316 ( / ) โ€ซุนโ€ฌF^โ€ซ ุงโ€ฌC  #jโ€ซ ุฃูˆ ุฃุขโ€ฌJ#  โ€ซ ยฌ ู†โ€ฌdim )D โ€ซ; ุง>= ุงู…โ€ฌJ (317 ( / ) 00ย† dim n(10),p(150) as string )3โ€ซ( ุงโ€ฌ318 ( / ) โ€ซุฏู‹ุงโ€ฌF โ€ซุฏุฃโ€ฌF โ€ซู‹ ุฃูˆโ€ฌCย† ู‹Cย† "^jโ€ซ< ุงโ€ฌFCQโ€ซุงุกุฉ ุฃูˆ ย›  ุงโ€ฌ# ย (319 โ€ซู‹ <ู†โ€ฌCย† ู‹Cย† <FCQโ€ซู ูˆุฃุฑุฏ ย›  ุงโ€ฌFCQ) I 2 โ€ซ  ุฉ ูˆ ุงโ€ฌรŒ C 2 % ST "^jโ€ซ< ุงโ€ฌFCQโ€ซ ุงโ€ฌ2j1 ^ (320 " print st(I,c); 2;mโ€ซุง ุงโ€ฌOP% โ€ซู†โ€ฌF;1  โ€ซ ( "ุฃูˆโ€ฌ/ ) Pint ST(I,C), โ€ซู†โ€ฌF;1  โ€ซ) ุงโ€ฌD โ€ซุฏู‹ุงโ€ฌF โ€ซุฏู‹ุงโ€ฌF <FCQโ€ซู ูˆุฃุฑุฏ ย›  ุงโ€ฌFCQ) I 2 โ€ซ  ุฉ ูˆ ุงโ€ฌรŒ C 2 % ST "^jโ€ซ< ุงโ€ฌFCQโ€ซ ุงโ€ฌ2j1 ^ (321 "ย›Fc^ โ€ซ ุฃูˆโ€ฌJโ€ซ ูˆู† <ย†) ุฏโ€ฌ% โ€ซ ( " ุฃูŠโ€ฌ/ ) Pint ST(I,C) โ€ซู†โ€ฌF;1  โ€ซ) ุงโ€ฌD โ€ซ<ู†โ€ฌ ( / ) <FCQ  #jโ€ซ ุฉ ุฃูˆ ุฃุขโ€ฌeโ€ซ< ูˆุงโ€ฌFCQ w) " H #โ€ซูˆุน " ุฃูˆ ุงโ€ฌ#mโ€ซูŠ ุงโ€ฌF0J โ€ซ; ุงู†โ€ฌJ (322

 jโ€ซุฃ>ย™) ุงุจ ุงโ€ฌ #jโ€ซ  < ุฃุขโ€ฌ#Cโ€ซ ุงโ€ฌH โ€ซุงโ€ฌ#โ€ซุฏุฉ  ุงโ€ฌC>Sโ€ซ ูˆุฅ ; ุงโ€ฌP3โ€ซ ูˆุงโ€ฌ/Fโ€ซ ุงโ€ฌ#<F1โ€ซ ูˆโ€ฌ2โ€ซ ุงโ€ฌq1  #Cโ€ซ ุงโ€ฌH โ€ซุงโ€ฌ#โ€ซุถ  ุงโ€ฌ#โ€ซ( ุงโ€ฌ323 2007( / ) โ€ซูˆุนโ€ฌ#m  ( / )ย†=โ€ซุงุก ุงโ€ฌ#Dโ€ซุงุก ุง ุง ูˆุฅโ€ฌ#Dโ€ซ ูˆุฅโ€ฌ#Cโ€ซุงุก ุงโ€ฌ#Dโ€ซุงุน ู‡ ุฅโ€ฌFโ€ซุซ ุงโ€ฌz wโ€ซ" ุฅโ€ฌ#โ€ซ ุงโ€ฌ$โ€ซ  < ุงโ€ฌ#Cโ€ซ ุงโ€ฌH โ€ซุงโ€ฌ#โ€ซ ุงโ€ฌGc1 (324 ( X )# G>โ€ซ ุขโ€ฌSUB )โ€ซุฒ ุง>= ุงู… ุขโ€ฌF3J (325 " โ€ซู…โ€ฌ.^) โ€ซุฒุฉโ€ฌF30 )โ€ซ ( " ุฃูŠ ู‡ ุขโ€ฌ/ ) #Cโ€ซ ุงโ€ฌH #โ€ซ ุงโ€ฌยฐJ#1 < SUB )D โ€ซ= ู…โ€ฌ1 (326 ( / ) #Cโ€ซ ุงโ€ฌH #โ€ซ ุงโ€ฌG>โ€ซ ุงโ€ฌw) #โ€ซ ุงโ€ฌ1 โ€ซูˆุทโ€ฌ#Z b^1 โ€ซยš ุงู†โ€ฌ3J (327 PD0J โ€ซุช ุงโ€ฌD#=โ€ซ ุง @ุช ูˆุงโ€ฌ1 H #โ€ซุงุช  ุง@ุฑ ุงโ€ฌ#โ€ซุงุช ู‡ ุฑุฉ  "  ุงโ€ฌ# โ€ซ( ุงุฑุงโ€ฌ328 ( / ) #Cโ€ซ ุงโ€ฌH #โ€ซุงโ€ฌ H #% โ€ซู ุฃูŠโ€ฌ#ย›  _  ย…โ€ซุฑโ€ฌFQ% _>โ€ซุถ ุงโ€ฌ# Genereal โ€ซุก ุงู…โ€ฌI3โ€ซ ุฃูˆ ุง ุง < ุงโ€ฌ#Cโ€ซ ุงโ€ฌH #โ€ซ;ยš ุงโ€ฌJ (329 ( / )#@ร† #< 2004( / ) call โ€ซุง> ุฑุฉโ€ฌF% #Cโ€ซ ุงโ€ฌH #โ€ซ ุง>

ุก ุงโ€ฌGJ (330 2003( / ) SubFโ€ซ ุฉ ู‡โ€ฌeโ€ซ   ูˆุงโ€ฌ#jโ€ซ ุฉ ุฃูˆ ุฃุขโ€ฌeโ€ซ"  ูˆุงโ€ฌ#โ€ซ ุงโ€ฌH #) ยญJ โ€ซ; ุงู†โ€ฌJ โ€ซูŠโ€ฌOโ€ซ ุงโ€ฌ#Cโ€ซ ุงโ€ฌH #โ€ซ( ุงโ€ฌ331 ( / )โ€ซุก ุงู…โ€ฌI3โ€ซ ุงโ€ฌwโ€ซ"ู‹ ุฅโ€ฌc)1 _)JF0% โ€ซู…โ€ฌ.^โ€ซู… ุงโ€ฌFc> H #โ€ซ ุงโ€ฌJP < โ€ซ ุฃูˆ ุง ุงโ€ฌ#Cโ€ซ ุงโ€ฌH #โ€ซ ุงโ€ฌ%โ€ซ( ^ ุขโ€ฌ332 ( / )eโ€ซุถ ูˆุงโ€ฌ#โ€ซู„ ูˆุงโ€ฌFโ€ซ ู‡ ุงโ€ฌ2โ€ซ ุงโ€ฌe โ€ซุฏโ€ฌ3Jโ€ซ ^ ุฅโ€ฌsub #Cโ€ซ ุงโ€ฌH #โ€ซุงุช < ุงโ€ฌ# โ€ซุฑุงโ€ฌ% (333  โ€ซุง  ุงู…โ€ฌ:โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ฌ

- 10 -


โ€ซโ€ช ^ (334โ€ฌุฅ ุฏุฉ ุขโ€ช %โ€ฌุงโ€ช

>% G ))3โ€ฌุก ุง(โ€ช#Dโ€ฌุงุก ุงโ€ชF  Area #Cโ€ฌุน โ€ช subโ€ฌุฐูˆ ุงุฑุง โ€ช#โ€ฌุงุช) โ€ช (( A ,B ,Cโ€ฌุฅโ€ฌ โ€ซ โ€ช $%โ€ฌุงโ€ชF;1 "#โ€ฌู† โ€ช2007( / )Call Area(A,B,C) -:โ€ฌโ€ฌ โ€ซโ€ช G J 01 ยš3J (335โ€ฌุงโ€ช#โ€ฌุงุช โ€ช )D 2โ€ฌุงโ€ช

>Sโ€ฌุก โ€ช( / )Callโ€ฌโ€ฌ โ€ซโ€ช =1 (336โ€ฌู… โ€ช ยฐJ#1 < function )Dโ€ฌุง ุง) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช (337โ€ฌุง ุง โ€ช% Pโ€ฌุฑุง โ€ช#โ€ฌุงุช @ุช ุฃ  ุง=โ€ชD#โ€ฌุช <;โ€ชFโ€ฌู† < ุง>โ€ช Gโ€ฌุง ุง) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช% (338โ€ฌุฑุง โ€ช#โ€ฌุงุช < ุง ุงโ€ช ^ functionโ€ฌุฅโ€ช3Jโ€ฌุฏ โ€ช eโ€ฌุงโ€ช 2โ€ฌู‡ ุงโ€ชFโ€ฌู„ ูˆุงโ€ช#โ€ฌุถ @ุช ูˆุงโ€ชP)j1 GJ eโ€ฌโ€ฌ โ€ซ< โ€ช #โ€ฌุข>โ€ช ) Gโ€ฌุง ) โ€ช ( /โ€ฌุงโ€ชcโ€ฌุฑ โ€ช %โ€ฌุง(โ€ช#Dโ€ฌุงุก ุงโ€ช #Cโ€ฌูˆุง ุง โ€ชู‹ D GPโ€ฌุง ุงโ€ช #.โ€ฌุง)โ€ชb0โ€ฌโ€ฌ โ€ซโ€ช ยš3J (339โ€ฌุฃู† โ€ชF;1โ€ฌู† ุงุฑุง โ€ช#โ€ฌุงุช"ุงโ€ช#โ€ฌุงุช"< โ€ช )Dโ€ฌุงโ€ช

>Sโ€ฌุก ุง ุง ุฃูˆ ุงโ€ช H #โ€ฌุงโ€ช ยš1#1 C^% #Cโ€ฌุงโ€ชFDFโ€ฌุฏุฉโ€ฌ โ€ซ )โ€ช )D < Pโ€ฌุง( ู†  ุงโ€ช H #โ€ฌุงโ€ช #Cโ€ฌุฃูˆ ุง ุง ) (โ€ฌ โ€ซโ€ช (340โ€ฌุฅโ€ช#Dโ€ฌุงุก ุง ุง โ€ช( / )Endfunction )3% P^Jโ€ฌโ€ฌ โ€ซโ€ช ;J (341โ€ฌุงู† โ€ช w

Jโ€ฌุงโ€ช H #โ€ฌุงโ€ช( / )#@ร† #< H #%  #Cโ€ฌโ€ฌ โ€ซโ€ช ;J (342โ€ฌุงู† โ€ช w

Jโ€ฌุงโ€ช H #โ€ฌุงโ€ช  #Cโ€ฌุฅโ€ช#Dโ€ฌุงุก ุฏุง) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช ;J (343โ€ฌุงู† โ€ช ) G1โ€ฌุง>

ุก ุง ุง  โ€ช( / )#@ร† #< H #%โ€ฌโ€ฌ โ€ซโ€ช ;J (344โ€ฌุงู† โ€ช ) G1โ€ฌุง>

ุก ุง ุง  ุฏุง_ ุฃ@โ€ช#โ€ฌู‰) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช ;J (345โ€ฌุงู† โ€ช ) G1โ€ฌุง>

ุก ุง ุง  โ€ช H #%โ€ฌุงโ€ช( / ) "#โ€ฌโ€ฌ โ€ซโ€ช P^J (346โ€ฌุงโ€ช H #โ€ฌุงโ€ช2004( / )Endsub )3% #Cโ€ฌโ€ฌ โ€ซโ€ชF J 01 (347โ€ฌุน ุฅโ€ช#Dโ€ฌุงุก ุง ุง < ุงโ€ช #J H #โ€ฌุง@ุฑโ€ช Jโ€ฌูˆ ุฅโ€ชDโ€ฌุฑโ€ชJโ€ฌุ› ูˆุฅุฐ โ€ช J 01 GJ Gโ€ฌุง^โ€ชFโ€ฌุน ุง ุง โ€ชF  #1โ€ฌุนโ€ฌ โ€ซ โ€ช#โ€ฌู† ) โ€ช2008( /โ€ฌโ€ฌ โ€ซโ€ช (348โ€ฌุง ุง โ€ช  ยD#1โ€ฌูˆุงโ€ช eโ€ฌุฉ )โ€ช H #โ€ฌุงโ€ช ^% "#โ€ฌุงโ€ช H #โ€ฌุงโ€ช ;J #Cโ€ฌุงู† โ€ช  ยD#Jโ€ฌูˆุงโ€ช eโ€ฌุฉ ุฃูˆ ุฃุขโ€ช  #jโ€ฌโ€ฌ โ€ซ) โ€ช2004( /โ€ฌุ›โ€ช2005โ€ฌุ›โ€ช2007โ€ฌโ€ฌ โ€ซโ€ช ;J (349โ€ฌุง>

ุก ุงโ€ช H #โ€ฌุงโ€ช #Cโ€ฌุฃุขโ€ช#  #jโ€ฌุฉ ูˆ< ุฃุขโ€ช < ยยœF  #jโ€ฌุงโ€ช H #โ€ฌุงโ€ช2003 ( / ) "#โ€ฌโ€ฌ โ€ซโ€ชF0J  (350โ€ฌูŠ ุงโ€ช w) H #โ€ฌุฃุขโ€ช #< H #%  #jโ€ฌุฃูˆ ุฏุง) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช (351โ€ฌุง ูˆุงู„ ุงโ€ช3โ€ฌู‡โ€ชIโ€ฌุฉ ู‡ ุง โ€ช ;Jโ€ฌุง>

ุคู‡ โ€ช %โ€ฌูˆู† ุงู† โ€ช#% ยš;1โ€ฌุง โ€ช P3โ€ฌุงโ€ชS  #Cโ€ฌู† ู‡โ€ชOโ€ฌุง ุงโ€ช#โ€ฌุง โ€ชIP31 G1 Hโ€ฌู‡ ยœโ€ฌ โ€ซุง^โ€ช.โ€ฌู…) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช log (352โ€ฌุฏุง ุง)โ€ช'Fโ€ฌุฑโ€ช GjJโ€ฌุง ) โ€ช( /โ€ฌโ€ฌ โ€ซ)โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช sqr (353โ€ฌุฏุง ุงโ€ชO3โ€ฌุฑ ุงโ€ช%#โ€ฌโ€ฌ โ€ซโ€ช =1 (354โ€ฌู… ุฏุง)(โ€ชFQ0Absโ€ฌู„ )โ€ช wโ€ฌุงโ€ช cโ€ฌุง)โ€ช ) cโ€ฌุฏ) โ€ช2008( /โ€ฌโ€ฌ โ€ซโ€ช Sin (355โ€ฌุฏุง โ€ช ยšDโ€ฌุงโ€ชIโ€ฌุงูˆโ€ช( / )Jโ€ฌโ€ฌ โ€ซโ€ชSgn (356โ€ฌุฏุง ุง(โ€ชZโ€ฌุฑุฉ ) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช (357โ€ฌุฏุง โ€ช fixโ€ฌูˆุง ุง โ€ช GJ intโ€ฌุง>= ุงู… ุง ุง โ€ชO0โ€ฌู ุงโ€ชI3โ€ฌุก ุง;โ€ช#โ€ฌู‰  ุง ุฏ ) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช (358โ€ฌุงโ€ช 1 ^1 D=int(4.67) )3โ€ฌุงโ€ช /%jโ€ฌุงโ€ช 4|0Qโ€ฌุฅ ุงโ€ช #โ€ฌุงโ€ช#โ€ฌู† โ€ช2008( / ) Dโ€ฌโ€ฌ โ€ซโ€ช (359โ€ฌุง^โ€ช H1โ€ฌุงุฑุฉ ุงโ€ชJ X=5\2 %0โ€ฌูˆูŠ โ€ช H1โ€ฌุงุฑุฉ ุงโ€ช( / ) X=fix(5/2) %0โ€ฌโ€ฌ โ€ซโ€ช Len (360โ€ฌุฏุง โ€ช =1โ€ฌู… โ€ช

<#โ€ฌุฏ ุงโ€ชF #โ€ฌุฒ < ุง^` ) โ€ช2003( /โ€ฌโ€ฌ โ€ซโ€ช =1 (361โ€ฌู… ุง ุง )(โ€ชe < SQRโ€ฌุจ ุงโ€ช cโ€ฌุง)โ€ช  cโ€ฌู‡โ€ชFDF Fโ€ฌุฏ โ€ช2004( X )P>F %โ€ฌโ€ฌ โ€ซโ€ช =1 (362โ€ฌู… ุง ุง )(โ€ชe < ABSโ€ฌุจ ุงโ€ชO3โ€ฌุฑ ุงโ€ช  %#โ€ฌู‡โ€ชFDF Fโ€ฌุฏ โ€ช2004( X )P>F %โ€ฌโ€ฌ โ€ซโ€ช =>% (363โ€ฌุงู… โ€ช W#)  ย‚Q=1 GJ W=sqr(4))Dโ€ฌู‡ โ€ช2007( / ) 2โ€ฌโ€ฌ โ€ซโ€ช =1 (364โ€ฌู… ุง ุง )(โ€ช F1 < sqrโ€ฌุฃุฑู… โ€ชFmโ€ฌุง" โ€ช % P ยcJโ€ฌุงโ€ช #CQโ€ฌูˆุงโ€ชFโ€ฌุงโ€ช eโ€ฌุงโ€ช2003( X )|0Qโ€ฌโ€ฌ โ€ซโ€ช Str (365โ€ฌุฏุง โ€ช  2JF0โ€ฌุฑโ€ช Gโ€ฌุฅโ€ช2005( / ) ` wโ€ฌุ›โ€ช2008โ€ฌโ€ฌ โ€ซโ€ช val (366โ€ฌุฏุง_ โ€ช ` 2JF0โ€ฌุฅโ€ช wโ€ฌุฑโ€ช( / ) Gโ€ฌโ€ฌ โ€ซโ€ช (367โ€ฌุงโ€ช 1 ^1 X%= Len("ali ahmad") )3โ€ฌุงโ€ช /%jโ€ฌุงโ€ช 9 |0Qโ€ฌุงโ€ช wโ€ฌุงโ€ช #โ€ฌุงโ€ช( / ) X |0Qโ€ฌโ€ฌ โ€ซโ€ช (368โ€ฌุงโ€ชFc1 Text1.text=str(v3) )3โ€ฌู… โ€ช 2JF0%โ€ฌุง ุฏ < ุงโ€ช v3#โ€ฌุฅโ€ช ย‚ wโ€ฌูˆย› _ < ุงโ€ช ^Qโ€ฌูˆู‚ โ€ช( / )Text1โ€ฌโ€ฌ โ€ซโ€ช Rnd (369โ€ฌุฏุง ุง ุฏ ุงโ€ชFmโ€ฌุง" ) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช Stddev (370โ€ฌุฏุง ุงโ€ช#0Sโ€ฌุงู ุงุฑูŠ) โ€ช( /โ€ฌโ€ฌ โ€ซโ€ช ^J x = average( 50 ,7,6) (371โ€ฌุฐโ€ช 1 $โ€ฌุงโ€ช( X ) x #) 63 cโ€ฌโ€ฌ โ€ซโ€ช (372โ€ฌุงโ€ช 1 ^1 X=fix(4.6) )3โ€ฌุงโ€ช /%jโ€ฌุงโ€ช 4 |0Qโ€ฌุฅโ€ช wโ€ฌุงโ€ช #โ€ฌุงโ€ช#โ€ฌู† โ€ช( / ) Xโ€ฌโ€ฌ โ€ซโ€ช (373โ€ฌุงโ€ช 1 ^1 X=sqr(100) )3โ€ฌุงโ€ช /%jโ€ฌุงโ€ช 10 |0Qโ€ฌุฅโ€ช wโ€ฌุงโ€ช #โ€ฌุงโ€ช#โ€ฌู† โ€ช2006( / )Xโ€ฌโ€ฌ โ€ซโ€ช- 11 -โ€ฌโ€ฌ

โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ช:โ€ฌุง  ุงู… โ€ฌ


( / )/F‫< ا‬# ‫= م‬1 ‫ دا‬time (374 ( / )ÏJ‫< ار‬# ‫= م‬1 ‫دا‬Date (375 ( / )2)‫ ا‬°Q^ O^ ‫ا‬Fj‫<

د ا‬# ‫= م‬1 ‫دا‬Timer (376 ( / ) ‚^‫ ا‬%# < 0‫ ا‬ÏJ‫ض ار‬# $‫^ ذ‬J text1 . text = date )D (377 ( / ) ‚^‫ ا‬%# < 0‫ ا‬/F‫ض ا‬# $‫^ ذ‬J text1 . text = time )D (378 ( / )00† print time )D (379 216‫؛‬215‫؛‬214‫؛‬213 ‫ ا;ب‬#.‫ ( ا‬/ )‫ات‬# ‫را‬% P date ‫ و‬time ‫( ا ا‬380

>‫أ>™) اب ا‬

#<FJ  ‫„رة‬C‫>= ام ا‬% OC^‫>ل وا‬S‫ ا‬FP% I1 %‫ا‬OD PD‫ وا‬GQ1 <  CJ ‫دوات‬M‫( †^ وق ا‬381 ( / )‫@ء < ا(د@ل‬M‫ وث ا‬e 2)cJ‫ و‬/F‫ا‬ /‫ذج‬F^‫ ا‬w) ‫م‬F>#‫ ا‬# M‫ زر ا‬w) #c^‫ ا‬2j ‫ ث‬e w) ً‫^ءا‬% OC^J #< H #% F‫ ث ه‬0% _PDF‫اء ا‬#D(‫( ا‬382 ( / ) #< H #% "#‫ ا‬$‫    ا‬2; DFJ (383 2005‫؛‬2004( / )H #‫ ا‬OC^1 ‫^ء‬z‫ أ‬# ‫وا‬M‫ († ار ا‬Command‫ر‬I‫= م ا‬J (384 2007( / )‫  ا= م‬# ‫وا‬M‫ل ا‬c>S Command‫ر‬I‫= م ا‬J (385 2;m‫ا ا‬OP% caption †@ ‫ = م‬Command1 # M‫ زر ا‬w) "še‫ آ) "ا‬%; (386 ( / ) command1.caption="še‫"ا‬ ( / )‫   ا@رات‬F3  ‫† ا@ر‬#< |^ Option Button‫ر‬I‫= م ا‬J (387 2008( X )‫ت‬D#=‫ ›  ا‬PCÂ‫ و‬option Botton‫داة‬M‫( ا‬388 ( / )End )D °` Command ‫>= ام زر‬% H #‫ ا‬OC^1 °S (389 If option1.value=true then (390 V3=v1+v2 Endif ( / ) v3=v1+v2 )3‫ ا‬OC^% G (|0† ‫)أي‬true ‫وي‬1 option1 ‫@ر‬S‫  ا‬/‫^ إذا آ‬1 … J 01 G1  ‫ر‬I‫ا ا‬OP 2%c‫@ر ا‬S‫^ ان ا‬J $‫داء وذ‬F‫ ا‬c^‫ ا‬#P.1 option ‫@ر‬S‫ زر ا‬w) #c^‫( ^ ا‬391 ( /) c‫… ا‬O‫ ه‬1 GJ‫  ر و‬w‫ ا‬text1 w‫ ا @) ا‬c‫ ا‬2JF01 ^1 v1=val(text1.text) )3‫( ا‬392 ( / ) v1 #‫ ا‬w‫ا‬ /‫ أرم و‬D ) ‫ ت‬D‫ ان و‬3‫| ) ا‬Q1 we val ‫ ا>= ام ا ا‬G1 v1=val(text1.text) (393 ( / ) ( q%‫ ) أي ر‬J ` )

( / ) text3 ‚^‫ ا‬%# < _ ›‫ ‚ و‬w‫ ا‬v3#‫  ا‬2JF01 ^1 text3text=str(v3) )3‫( ا‬394 / )"‫دوات‬M‫   أزرار"أي ا‬F3 3 ‫= م‬1 ‫دوات‬M‫دة < †^ وق ا‬FDF ‫ رة  أداة‬F‫ ه‬frame‫( إ›ر‬395 ( / ) frame ‫ < ا›ر‬option ‫@ر‬S‫ أزرار ا‬31 ;J (396 )‫ آ‬w‫ إ‬Frame1 "c)‫ ا‬G>S‫  ا‬frame1 ‫ان‬F^ #1 ^1 frame1.caption= "‫) "ا)ت‬3‫( ا‬397 ( / ) caption †@ ‫>= ام‬% ‫ا)ت‬ ‫ ة‬e‫" د< وا‬c‫ض ا‬# ‫= م‬1 ‫دوات‬M‫دة < †^ وق ا‬FDF ‫ رة  أداة‬F‫ ه‬List box "c‫ ا‬%# (398 2008( / ) ‫ًا‬#Q^ "c‫ض ا‬# ‫= م‬1 ‫دوات‬M‫دة < †^ وق ا‬FDF ‫ رة  أداة‬F‫ ه‬Cmbo box ‫د‬#‫ ا‬%# (399 ( / )"‫ا‬#> ‫ًا‬#> ‫ًا " أي‬#Q^

‫ذج " أي‬F^‫  ا‬#† Ie ‫= م‬J _„% List box "c‫ ا‬%#  Combo box ‫د‬#‫ ا‬%# IJ (400 ( / )"‫ذج‬F^‫  ا‬qc< e‫ وا‬#> w‫ج إ‬0J ( / )list ‫ دة = م أداة‬0‫د ا‬F^‫   ا‬F3  e‫^ وا‬% ‫@ر‬S (401  ‫ا  ام‬:‫  إ

اد رس ادة‬

- 12 -


( / ) list1 " wโ€ซู‹ุง ุฅโ€ฌ#Q^ <ยœโ€ซ^ ุฅโ€ฌ1 List1.Additem"ahmad" )3โ€ซ( ุงโ€ฌ402 ( / ) Combo1 โ€ซุฏโ€ฌ#โ€ซย ุงโ€ฌ%# wโ€ซู‹ุง ุฅโ€ฌ#Q^ <ยœโ€ซ^ ุฅโ€ฌ1 Combo1.Additem"ahmad" )3โ€ซ( ุงโ€ฌ403 ( / )Jโ€ซุฏโ€ฌ#โ€ซ" ุงโ€ฌcโ€ซ < ุงโ€ฌ#Q^โ€ซ ุงโ€ฌGโ€ซ ุฑโ€ฌJ 0% โ€ซู…โ€ฌFcJ Combo1.listindex 2 โ€ซ( ุงโ€ฌ404 ( / )โ€ซุงโ€ฌO;โ€ซ ูˆู‡โ€ฌjโ€ซ )^ ุง^ ุงโ€ฌ1โ€ซูˆูŠโ€ฌ1โ€ซ" ูˆโ€ฌcโ€ซูˆู„  ุงโ€ฌMโ€ซ )^ ุงโ€ฌ#Cย† โ€ซูˆูŠโ€ฌ1 listindex 2 โ€ซ(  ุงโ€ฌ405 ( / ) list1 "cโ€ซ ุงโ€ฌwโ€ซ ุฅโ€ฌtext1ย‚^โ€ซย ุงโ€ฌ%# โ€ซู‰โ€ฌF0 <ยœโ€ซ^ ุฅโ€ฌ1 List1.additem text1.text )3โ€ซ( ุงโ€ฌ406

โ€ซ ูˆุง ุงโ€ฌ#Cโ€ซุงุก ุงโ€ฌ#D(โ€ซ ุงโ€ฌ% โ€ซุฑโ€ฌcโ€ซุงโ€ฌ โ€ซุงุณโ€ฌFMโ€ซ ุงโ€ฌ% โ€ซ@ุฑโ€ฌSโ€ซุฑ < ุฃ>ย™) ยœย   ย†| ุฃูˆ @ย„ ูˆ< ุฃ>ย™) ุงโ€ฌcโ€ซุง ุงโ€ฌOโ€ซ ู‡โ€ฌ1ย„1

function โ€ซุงุก ุง ุงโ€ฌ#D(โ€ซุงโ€ฌ sub #Cโ€ซุงุก ุงโ€ฌ#D(โ€ซุงโ€ฌ ^ "#โ€ซ ุงโ€ฌH #) qc< โ€ซ ุฉโ€ฌeโ€ซยญ  ูˆุงโ€ฌJ "#โ€ซ ุงโ€ฌH #) #jโ€ซ ุฉ ุฃูˆ ุฃุขโ€ฌeโ€ซยญ  ูˆุงโ€ฌJ . โ€ซ ุง ุงโ€ฌG>S % qc< โ€ซุงุช( ุง @ุชโ€ฌ# โ€ซุฑุงโ€ฌ%) โ€ซุงุชโ€ฌ#โ€ซ;ยš ุงโ€ฌ1 โ€ซุงุช( ุง @ุชโ€ฌ# โ€ซุฑุงโ€ฌ%) โ€ซุงุชโ€ฌ#โ€ซ;ยš ุงโ€ฌ1 function )D < >F sub )D < >F % PD โ€ซุชโ€ฌD#=โ€ซูˆุงโ€ฌ โ€ซุนโ€ฌF J 01 GJ G โ€ซุน ุง ุง ุ› ูˆุฅุฐโ€ฌF J 01 ยš3J . โ€ซุนโ€ฌF _  โ€ซู†โ€ฌ# โ€ซุนโ€ฌF  #1 โ€ซุง ุง ุ›โ€ฌ #@ร† # G>% โ€ซุงุก ุง ุงโ€ฌ#Dโ€ซ ุฅโ€ฌG>โ€ซ ุงโ€ฌw

J โ€ซุงุกโ€ฌ#D(โ€ซ ุงโ€ฌG>โ€ซ `^ ุงโ€ฌcall )3% w

J -:(ย‚Q=โ€ซ) ุงโ€ฌD bJ#ย›  โ€ซ)ุฃูŠโ€ฌ

#Cโ€ซุงโ€ฌ ย‚Q=โ€ซ) ุงโ€ฌD โ€ซ ุง>= ุงู…โ€ฌG1 x=r(a,b) -: ู‹ j< โ€ซุงุชโ€ฌ# โ€ซ ย ุงุฑุงโ€ฌ โ€ซย‚  ุง ุง" ุฃูŠโ€ฌQ=1โ€ซ>

ุก ุง ุง ูˆโ€ฌS jโ€ซ ุงโ€ฌcJ#โ€ซุงโ€ฌ .x#) "H1^โ€ซุงโ€ฌ print  โ€ซ) ุงโ€ฌD bJ#ย›  โ€ซ>

ุกโ€ฌSโ€ซุงโ€ฌ โ€ซ ย›   ุง ุงโ€ฌG< print r(a,b) -: ู‹ j< .โ€ซุฐุฌโ€ฌF^โ€ซ ุงโ€ฌw) "H1^โ€ซ" ุฃูŠ ุงโ€ฌ )3% P^Jโ€ซ ูˆโ€ฌfunction )3% โ€ซ ุฃโ€ฌJ end sub )3% P^Jโ€ซ ูˆโ€ฌsub )3% โ€ซ ุฃโ€ฌJ endfunction โ€ซุฐุฌโ€ฌF^โ€ซ(  ุงโ€ฌGeneral ) โ€ซุก ุงู…โ€ฌID < ยš;J โ€ซุฐุฌโ€ฌF^โ€ซ(  ุงโ€ฌGeneral ) โ€ซุก ุงู…โ€ฌID < ยš;J b<Fโ€ซุญ ูˆุงโ€ฌ3^% ย3) 1^1 ย

 โ€ซุง  ุงู…โ€ฌ:โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ฌ

- 13 -

โ€ซุชโ€ฌ 1 2 3 4

5 6


‫‪ 2e‬ا‪0 S‬ت ا‪ c%‬دة ا‪F>0‬ب ‪  P)JF01 %‬أ>™) ‪ c‬إ‪ w‬ا‪ )™>M‬ا‪@S‬ر‬ ‫› ً ‪ G1‬ا(‪ D  %D‬أ>™) œ   †| أو @„ وا‪M‬آ‪ 2‬وا‪@S‬ر ‪ 3‬ا‪0 S‬ت‬ ‫  @ل ‪c‬ط †| وا=„ ا‪c%‬‬ ‫‪ 2e‬ا ‪0‬ن ا ور ا‪M‬ول م ‪2003‬ف‬ ‫أ>™) ا‪@S‬ر   د ‪-:‬‬

‫أ‪  šD‬ا‪ )™>M‬ا  @ل ه‪O‬ا ا‪-:H #‬‬ ‫)(‪Private Sub Form_Load‬‬ ‫‪i=1‬‬ ‫‪F=1‬‬ ‫)‪Do While (i <= 5‬‬ ‫‪F=F*i‬‬ ‫‪i=i+1‬‬ ‫‪Loop‬‬ ‫‪Print F‬‬ ‫‪End Sub‬‬

‫س‪  -1‬ه‪ F‬ا‪#‬ض  ‪)D‬‬ ‫‪-:I=i+1‬‬ ‫أ(إ‪3J‬د ‪ D 2†e‬ا(

اد  ‪1‬ا‪5w‬‬ ‫ب(إ‪3J‬د أآ‪ )   #‬ا‪.3‬‬ ‫ج(إ‪3J‬د ‪ c‬ار ا‪JI‬دة ‪c‬‬ ‫‪ I‬وآ اد ‪ °F‬ا‪.c)0‬‬

‫س‪  -3‬ه‪ F‬ا‪#‬ض  ا‪ -: H #‬س‪ ^ do while (i<=5) )D -4‬آ‪%‬‬ ‫‪ =>%‬ام ‪F;1 do until‬ن ‪-:‬‬ ‫أ( إ‪3J‬د `‪#‬وب ا د ‪.4‬‬ ‫ب(إ‪3J‬د ‪#œ 2†e‬ب ‪ 5‬أرم‪.‬‬ ‫أ()‪Do until ( I <=5‬‬ ‫ج( إ‪3J‬د `‪#‬وب ا د ‪.5‬‬ ‫ب()‪Do until ( I <5‬‬ ‫ج()‪Do until ( I >5‬‬

‫س ‪#C -: 2‬ض أن ‪)D‬‬ ‫‪O0 i=i+1‬و< <‪f‬ن ‪-:‬‬ ‫أ( ا‪F> c)0‬ف ‪#1‬‬ ‫‪ %‬وران ‪FQ%‬رة '‪."P #‬‬ ‫ب(ا‪F> c)0‬ف ‪.°F1‬‬ ‫ج(ا‪F> c)0‬ف ‪S °F1‬ن‬ ‫ ‪i=1‬‬ ‫س‪  -5‬ه‪ OC^1 H1 F‬ا‪:H #‬‬ ‫أ(‪.60‬‬ ‫ب(‪.24‬‬ ‫ج(‪.120‬‬ ‫د(آ‪.„@ b>  2‬‬

‫س‪ -5‬ا=‪F‬ارز  (‪3J‬د `‪#‬وب ا د ‪ 5‬ه ‪-:‬‬ ‫ب(‬ ‫أ(‬ ‫‪-1‬ا‪ %‬أ‬ ‫‪-1‬ا‪ %‬أ‬ ‫‪-2‬دع ‪i=1‬‬ ‫‪-2‬دع ‪i=1‬‬ ‫‪-3‬دع ‪f=1‬‬ ‫‪-3‬دع ‪f=1‬‬ ‫‪-4‬ا‪f=f*f še‬‬ ‫‪-4‬ا‪f=f*i še‬‬ ‫‪-5‬ا‪i=i+1 še‬‬ ‫‪-5‬ا‪i=i+1 še‬‬ ‫‪-6‬رن ‪5  i %‬‬ ‫‪-6‬رن ‪5  i %‬‬ ‫إذا آ‪ I) /‬ا†‪  #‬أو ‪1‬وي‪(5‬ار‪ D‬إ‪ w‬ا=‪F‬ة ر‪4 G‬‬ ‫إذا آ‪ I) /‬ا†‪  #‬أو ‪1‬وي‪(5‬ار‪ D‬إ‪ w‬ا=‪F‬ة ر‪4 G‬‬ ‫وا‪ S‬ا>‪ #‬إ‪ w‬ا=‪F‬ة ر‪7 G‬‬ ‫وا‪ S‬ا>‪ #‬إ‪ w‬ا=‪F‬ة ر‪7 G‬‬ ‫‪-7‬اآš ‪f‬‬ ‫‪-7‬اآš ‪f‬‬ ‫‪°F1-8‬‬ ‫‪°F1-8‬‬

‫س‪ -:6‬ا=‪ q‬ا‪3J( %S‬د `‪#‬وب ا د ‪-:5‬‬ ‫أ‬

‫اا‬ ‫دع ‪f=1‬‬

‫‪- 14 -‬‬

‫اا‬

‫ادة‪:‬ا  ام ‬ ‫  إ

اد رس ب‬

‫دع ‪f=1‬‬


Private Sub Form_Load() -:H #‫ا ا‬O‫>™) ا  @ل ه‬M‫š  ا‬D‫أ‬ Text1.text="" ch$ = InputBox("‫وف ا ط أو ب أو م أو س‬#0‫  ا‬e‫ أ‬2@‫)"أد‬ -:H #‫ض  ا‬#‫ ا‬F‫  ه‬-1‫س‬ Select Case ch$ .)%‫ا‬#› ^J ‫ ا‬G>‫أ(›  ا‬ Case"‫"ط‬ .‫ذج‬F^‫ ا‬w) ^J ‫ ا‬G>‫ب(›  ا‬ Nam$=")%‫ا‬#›" ‫) أو‬%‫ا‬#› : ‫ وا ن ه‬P>‫ول  ا‬S‫ف ا‬#0‫د إد@ل ا‬#3% ^J ‫ ا‬G>‫ج(›  ا‬ Case"‫"ب‬ ‫ر ارة‬PÂf% H #‫م ا‬FcJ „@ ‫ف‬#e ‫ اد@ل‬e <‫_ و‬1‫ا‬#Q ‫ت أو‬#>‫^زي أو‬% Nam$="‫^زي‬%" .G)> #' ‫د@ل‬S‫ا‬ Case"‫"م‬ -----------------------------------------------------------------------------nam$="_1‫ا‬#Q " Text1.text="" )3‫^ ا‬1 ‫ ذا‬-2‫س‬ Case"‫"س‬ .‚^‫ ا‬%# "#CQ1 ‫‡ "أو‬J#C1(‫أ‬ Nam$="‫ت‬#>" .‫ذج‬F^‫ ا‬w) ‫اغ‬#C‫ب(›  ا‬ Case Else .„@ b>  2‫ج(آ‬ Nam$="G)> #' ‫ "إد@ل‬-----------------------------------------------------------------------------End Select inputbox‫د@ل‬S‫ض  دا ا‬#‫ ا‬F‫ ه‬-3‫س‬ Text1.Text = nam$ .|0† ‫ع‬F  /%z ‫أ( إد@ل‬ Label1.Caption="^J ‫ ا‬G>‫"ا‬ ch$#‫ ا‬w‫ ا‬P^1‫< و‬#e  ‫ب(إد@ل‬ End Sub .P^ ‫ <" ة‬S(‫ج‬ -----------------------------------------------------------------------------w) #P.J ‫ف‬F> H #‫ ا‬OC^1 H1-4‫س‬ .text1 ‚^‫ ا‬%# (‫ج‬ .text2 ‚^‫ ا‬%# (‫ب‬ .‫ذج‬F^‫أ(ا‬ Label1.caption="^J ‫ ا‬G>‫)" ا‬D  ‫ض‬#‫ا‬-6‫===== س‬ Case else )D  ‫ض‬#‫ا‬-5‫س‬ . H1^‫ ا‬°†‫أ(و‬ ==== .#) "G)> #' ‫د@ل‬S‫‚ ارة "ا‬Q=1(‫أ‬ .H1^‫ر ا‬PÂ‫ب(ا‬ ==== .P^ ‫<" ة‬S(‫ب‬ .H #‫ ا‬2m1 ‫^ء‬z‫ أ‬# ‫وا‬S‫ === ج(ا† ار ا‬.F #'  ‫د@ل‬% ‫م ا= م‬FcJ  ^ )J ‫ ا‬0‫ج(ا‬  ‫ا  ام‬:‫  إ

اد رس ادة‬

- 15 -


--------------------------------------------------------------------------------------------------------------Private Sub Form_Load() ch$ = InputBox("‫وف ا ط أو ب أو م أو س‬#0‫  ا‬e‫ أ‬2@‫)"أد‬ ‫>= ام‬% H #‫ ا‬%‫ ^ آ‬-7‫س‬ If (ch $="‫ ) "ط‬$Then -:2;m‫ا ا‬OP% 20‫ن ا‬F;J If –then Nam$=")%‫ا‬#›" . |† (‫أ‬ if-then ‫>= ام‬% 20‫ا‬ Else .„@ (‫ب‬ If (ch $="‫)"ب‬Then ------------------------------Nam$="‫^زي‬%" if-then 2‫ آ‬J‫ور‬#œ endif )D #1 -(1-7‫س‬ Else .|†(‫أ‬ If (ch $="‫)"م‬Then .„@(‫ب‬ Nam$="_1‫ا‬#Q " ------------------------------Else -: ^1 if(ch$="‫) "م‬then )3‫ا‬-(2-7‫س‬ If (ch $="‫)"س‬Then "‫< "م‬#0‫ ا‬/%j‫وي ا‬1 ch$#‫أ(إذا آن  ا‬ Nam$="‫ت‬#>" else )D OC S‫ وا‬if-then % ‫ا‬F‫ ا‬23‫ ا‬OC Else "‫< "م‬#0‫ ا‬/%j‫وي ا‬1 ch$#‫ب( إذا آن  ا‬ nam$="G)> #' ‫"إد@ل‬ else ‫ و‬if-then % ‫ا‬F‫ ا‬23‫ ا‬OC^1 S End If .b>  2‫ج( آ‬ End If ---------------------------------------------------------------End If

^ autoRedraw †@ #1 š3J-(3-7‫س‬ End If -:text1 ‚^‫ ا‬%# w) H1^‫ر ا‬PÂ‫إ‬ Text1.Text = nam$ .„@(‫ب‬|† (‫أ‬ Label1.Caption="^J ‫ ا‬G>‫"ا‬ End Sub

=========================================================

Sub maxim(a, b, c, Max) -:H #‫ا ا‬O‫>™) ا  @ل ه‬M‫š  ا‬D‫أ‬ Max = a -: #C‫ ا‬H #‫ا ا‬O‫ض  ه‬#‫ ا‬F‫  ه‬-1‫س‬ If b > Max Then .max #‫ ا‬w‫_ إ‬QQ=1‫ و‬#‫آ‬M‫د ا‬3J‫ وإ‬J‫

د‬% ‫ر‬c‫أ(ا‬ Max = b .max#‫ ا‬w‫_ إ‬QQ=1‫

د و‬#†‫د ا‬3J‫ث أ

اد وإ‬z % ‫ر‬c‫ب(ا‬ End If .max #‫ ا‬w‫_ إ‬QQ=1‫

د و‬#‫د اآ‬3J‫ث أ

اد وإ‬z % ‫ر‬c‫ج(ا‬ If c > Max Then ------------------------------------------------------------------------Max = c -: ‫ع‬F  #C‫ ا‬H #‫ا ا‬O‫ ه‬-2‫س‬ End If .†=‫اء ا‬#D‫– ج(إ‬ ‫اء دا‬#D‫– ب( إ‬

#< ‫اء‬#D‫أ(إ‬ End Sub ------------------------------------------------------------------------maxim(‫ج‬- submaxim(‫ب‬- max (‫ أ‬-:F‫ ه‬#C‫ ا‬H #‫ ا‬G>‫ا‬-3‫س‬ ------------------------------------------------------------------------.„@(‫ أ( †| – ب‬-: #C‫ ا‬H #) J‫ور‬#œ endsub )D #1-4‫س‬ -------------------------------------------------------------------------: ‫ ه‬#C‫ ا‬H #) ‫ات‬# ‫ارا‬-5‫س‬ max,a,b(‫ ج‬a,b,a,max(‫ب‬ a,b,c (‫أ‬

Private Sub Form_Load() a = InputBox("w‫و‬S‫ ا‬c‫ ا‬2@‫)"اد‬ b = InputBox("j‫ ا‬c‫ ا‬2@‫)"اد‬ c = InputBox("jj‫ ا‬c‫ ا‬2@‫)"اد‬ maxim(a, b, c, ‫إ

اد‬ Max)  Call ‫  ام‬ ‫ا‬:‫ رس ادة‬  - 16 Print Max End Sub

#C‫ ا‬H #) "#‫ ا‬H #‫ ا‬%‫ ^ آ‬-6‫س‬ 2;m‫ا ا‬OP% ‫ن‬F;J


---------------------------------------------------------------------------------------------------------------:2;m‫ا ا‬OP% ‫ن‬F;J ‫>= ام ا ا‬% #C‫ ا‬H #‫ا ا‬O‫ ه‬%‫ ^ آ‬-7‫س‬ Function Max(a, b, c) .„@(‫– ب‬ |† (‫أ‬ Max = a --------------------------------------------------------------------------If b > Max Then -: ‫ ة ه‬e‫ع  وا‬D‫ر‬f% ‫م ا ا‬Fc1-(1-7‫س‬ Max = b max ‫ ا ا‬G>‫) < ا‬j ‫ ة‬e‫ع  وا‬D‫ر‬f% ‫م‬Fc1(‫ج‬- c (‫ – ب‬b(‫أ‬ End If --------------------------------------------------------------------------If c > Max Then -: ‫ < ا ا‬endfunction )D -(2-7‫س‬ Max = c ._^ ‫ <" ة‬S(‫– ج‬ J‫ور‬#œ (‫ ب‬J‫أ(ا@ر‬ End If --------------------------------------------------------------------------End Function -:‫ن‬F;1 print )D bJ#›  ™J#‫ ا‬H #‫>

ء ا ا < ا‬S -(3-7‫س‬ print max(a,b,c) (‫أ‬ print max(c,b,a)(‫ب‬ ‫>

ء و ا( ن‬S‫) ا‬D < ‫ات‬# ‫š ارا‬1#‫ ا‬w^1 S -:¯e print max(a,b,c,max)(‫ج‬ ---------------------------------------------------------------------------------------------------------------

-:H #‫ا ا‬O‫>™) ا  @ل ه‬M‫š  ا‬D‫أ‬

Private Sub Form_Load() Dim nam(10) As String dim nam(10)as string)D  ‫ض‬#‫ ا‬F‫ ه‬-1‫س‬ Dim marks(10) As Single namG>% J % ‫< ذات‬FCQ "#‫ة ا‬#‫اآ‬O‫ا < ا‬F 10I3e(‫أ‬ For i = 1 To 10

‫ ا‬J‫د‬e‫< أ‬FCQ "#‫ة ا‬#‫اآ‬O‫ا < ا‬F 10I3e (‫ب‬ nam(i) = InputBox("("š‫ ا‬G>‫ ا‬2@‫)"اد‬ .‫ي‬#‫ع آ‬F  namG>% marks(i) = InputBox(" ‫ب‬F>0‫ ادةا‬D‫ در‬2@‫)"اد‬ .<FCQ "#‫ة ا‬#‫اآ‬O‫ا < ا‬F 10I3e (‫ج‬ Next i . <#e ‫ع‬F  namG>% ‫ ا‬J‫د‬e‫أ‬ Max=marks(1) -------------------------------------------------------------X=0 if(marks(i)>max)then )D  ‫ض‬#‫ ا‬F‫ ه‬-2‫س‬ For i = 2 To 10 .max#‫^_ < ا‬JI=1‫< و‬FCQ‫ < ا‬#†S‫ ا‬c‫د ا‬3J‫أ(إ‬ If (marks(i) > Max) Then )

% marks<FCQ‫ ا‬G   #‫د اآ‬3J‫ب(إ‬ Max = marks(i) .max#‫^_ < ا‬JI=1‫ر و‬c‫ا‬ x=i .max#‫^_ < ا‬JI=1‫ و‬Gc‫   ا‬F3   #‫د أآ‬3J‫ج(إ‬ End If -------------------------------------------------------------Next i -:H #‫ض  ا‬#‫ ا‬F‫ ه‬-3‫س‬ Print nam(x), Max, ""‫ول‬M‫š ا‬1#‫"ا‬ D‫ در‬#†‫ أ‬w) 2Q0‫ اš ا‬G>‫أ(›  أ‬ End Sub .‫ول‬M‫š ا‬1#‫ رة ا‬P  ‫ وأ‬D‫ در‬w) ‫ أ‬w) 2Q0‫ اš ا‬D‫ب(›  در‬ < GP1D‫ در‬2j1 marks G>% j‫ وا‬namG>% )‫ ا‬10‫ ا>ء

د‬2j1 w‫و‬S‫ ا‬J‫د‬e‫< ا‬FCQ JI=1(‫ج‬ ."‫ول‬S‫š ا‬1#‫_ و رة "ا‬D‫ وأ  _ در‬D‫ در‬w) ‫ أ‬w) 2Q0‫ اš ا‬G>‫ ›  ا‬Gz‫ب ؛‬F>0‫ دة ا‬ -------------------------------------------------------------._^ ‫ <" ة‬S(‫ج‬-<FCQ‫ ا‬F JI= # (‫ب‬- I  JI= # (‫ أ‬-: X =i)D  ‫ض‬#‫ ا‬F‫ ه‬-4‫س‬ --------------------------------------------------------------------------------------------------------------marks <FCQ G  #‫آ‬M‫ ا‬c‫ ا‬JI= # (‫ أ‬-:MAX #‫ض  ا‬#‫ ا‬F‫ ه‬-5‫س‬ num <FCQ G  #‫آ‬S‫ ا‬c‫ ا‬JI= # (‫–ج‬ .D‫ در‬#†‫د ا‬3JS # (‫ب‬ ------------------------------------------------------------------------------------------------------------:max=marks(1) )D  ‫ض‬#‫ ا‬F‫ ه‬-6‫س‬  ‫ا  ام‬:‫  إ

اد رس ادة‬

- 17 -


.D‫ در‬#‫ أول ›š أآ‬D‫ن در‬S(‫–ج‬ .J‫) ا@ر‬D(‫ب‬.š› ‫ أول‬D‫ ا"  در‬%‫أ( ا‬ --------------------------------------------------------------------------------------------------------------.‫ب‬F>0‫ت ا) < دة ا‬D‫ در‬JI=1(‫ب‬-.)‫ أ>ء ا‬JI=1(‫ أ‬-:marks <FCQ  ‫ض‬#‫ ا‬F‫ ه‬-7‫س‬ ---------------------------------------------------------------------------------------------------------------: 2;m‫ا ا‬OP% ‫ن‬F;J text1 ‚^‫ ا‬%# < š‫ )_ ا‬2Q0 D‫ در‬w) ‫ أ‬H1^‫ر ا‬PÂ‫ ^ إ‬-8‫س‬ text1.text=nam(x)(‫ج‬ .text1.text=max(‫ ب‬-. text1.text="‫ول‬S‫š ا‬1#‫أ( "ا‬ ---------------------------------------------------------------------------------------------------------------: 2;m‫ا ا‬OP% ‫ن‬F;J text2 ‚^‫ ا‬%# < D‫ در‬w) ‫ أ‬2Q0‫ اš ا‬G>‫ر ا‬PÂ‫ ^ إ‬-9‫س‬ text2.text=nam(x)(‫ج‬ .text2.text=max(‫ ب‬-. text2.text="‫ول‬S‫š ا‬1#‫أ( "ا‬ ---------------------------------------------------------------------------------------------------------------: 2;m‫ا ا‬OP% ‫ن‬F;1 "#‫ ا‬$‫>= ام ادوات ا‬% "‫ول‬S‫š ا‬1#‫" ا‬0œF‫) ا‬3‫ر ا‬PÂ‫ ^ إ‬-8‫س‬ .command1.caption="‫ول‬S‫š ا‬1#‫ ب("ا‬. text3.text="‫ول‬S‫š ا‬1#‫أ( "ا‬ Label1.caption="‫ول‬S‫š ا‬1#‫ج( "ا‬ ---------------------------------------------------------------------------------------------------------------: cJ#‫… ا‬OP% 20‫; ا‬J -( 1- 9‫س‬ „@ (‫ب‬ |† (‫ا‬ Private Sub Form_Load() Dim nam(10) As String Dim marks(10) As Single Max=0 For i = 1 To 10 nam(i) = InputBox("("š‫ ا‬G>‫ ا‬2@‫)"اد‬ marks(i) = InputBox(" ‫ب‬F>0‫ ادةا‬D‫ در‬2@‫)"اد‬ Next i For i = 1 To 10 If (marks(i) > Max) Then Max = marks(i) x=i End If Next i Print nam(x), Max, ""‫ول‬M‫š ا‬1#‫"ا‬ End Sub ================================================================ -:2;m‫ا ا‬OP% ›#m‫ن † ا‬F;1 <FCQ‫ < ا‬D‫ در‬#†‫ب ا‬F)‫ن ا‬F;J  ^ (-2-9‫س‬ if ( marks(i)<min) then (‫أ‬ if ( marks(i)>min) then(‫ب‬ if (min<> marks(i)) then(‫ج‬

=========================================================

Private Sub Form_Load() -:H #‫ا ا‬O‫>™) ا  @ل ه‬M‫š  ا‬D‫أ‬ Dim str(5, 4) As Single Sum = 0 For i = 1 To 5  ‫ا  ام‬:‫  إ

اد رس ادة‬ - 18 For j = 1 To 4 str(i, j) = InputBox("‫ب‬F>0‫ اš < دة ا‬D‫ در‬2@‫)"أد‬


dim str(5,4)as single)3‫^ ا‬1 ‫ ذا‬-1‫س‬ <FCQ "#‫ة ا‬#‫ < ذاآ‬F 20I3e(‫أ‬ . <#e ‫ع‬F  str G>% <FCQ "#‫ة ا‬#‫ < ذاآ‬F 20I3e(‫ب‬ .‫ي‬#‫ع آ‬F  ‫ ا  ة‬5‫ف و‬FC† 4 w) ‫ي‬F01 str G>% <FCQ "#‫ة ا‬#‫ < ذاآ‬F 20I3e (‫ج‬ .‫ي‬#‫ع آ‬F  ‫ ا  ة‬4‫ف و‬FC† 5 w) ‫ي‬F01 str G>% -----------------------------------------------------------for-next )D  ‫ض‬#‫ ا‬F‫ ه‬-2‫س‬ .‫ ة‬e‫ة وا‬# 2D   F3 ‫ار‬#;1(‫أ‬ ._^ ‫ <" ة‬S(‫ب‬ .‫ات‬# ‫

ة‬next‫ و‬for % ‫رة‬FQ0‫ ا‬23‫ار ا‬#;1(‫ج‬ -----------------------------------------------------------sum=sum+str(I,j) )D  ‫ض‬#‫ ا‬F‫ ه‬-3‫س‬ ‚Q=1‫ و‬str<FCQ‫ا‬#†^ D 2†e ‫د‬3J‫ب(إ‬- q>F‫د ا‬3J‫أ(إ‬ ‫ات‬#‫   ا‬F3 D 2†e ‫د‬3J‫ج(إ‬- sum #) H1^‫ا‬ --------------------------------------------------------------------------------------------------------------.b> 2‫ج( آ‬);‫ ا‬3‫د ا‬3J‫ب(إ‬- q>F‫د ا‬3J‫ ا(إ‬-: avr=sum/20 )D  ‫ض‬#‫ ا‬F‫ ه‬-4‫س‬ --------------------------------------------------------------------------------------------------------------9(‫ج‬20(‫ب‬12 (‫ أ‬-:F‫ه‬str<FCQ)"#†^‫ا"أو ا‬F‫

د ا‬-5‫س‬ --------------------------------------------------------------------------------------------------------------.C† C† ‫ذج‬F^‫ ا‬w) str<FCQ‫أ( ›  ا‬ -: print str(I,j), )D  ‫ض‬#‫ ا‬F‫ ه‬-6‫س‬ .str#‫ج(›  ا‬‫دا‬F ‫دا‬F ‫ذج‬F^‫ ا‬w) str<FCQ‫ب( ›  ا‬ ---------------------------------------------------------------------------------------------------------------: ‫) ا‬D ‫ن‬F;1 ‫دا‬F ‫دا‬F <FCQ‫  ا‬-7‫س‬ print str (I,i)(‫ج‬ print str(j,i),(‫ب‬ print str(I,j) (‫أ‬ --------------------------------------------------------------------------------------------------------------P^ ‫ <" ة‬S(‫ ا ا@) –ب‬c)0‫ء  ا‬PS‫ ا‬% J D #> w‫ل إ‬c(‫ أ‬-:print )D  ‫ض‬#‫ ا‬F‫ ه‬-8‫س‬ .#‫ ا‬C w)  ‫ج(ا‬--------------------------------------------------------------------------------------------------------------.„@(‫ب‬|† (‫ أ‬-:D‫ ا=ر‬c)0‫ ه ا‬j c)e #1-9‫س‬ --------------------------------------------------------------------------------------------------------------print str(I,j)(‫ج‬- print sum(‫ –ب‬print avr(‫ أ‬-: ‫ذج ه‬F^‫ ا‬w) q>F‫)    ا‬D-10‫س‬ ---------------------------------------------------------------------------------------------------------------:‚ %# w) <FCQ)"#†^‫"ا‬Gc‫ع ا‬F3 ‫ر‬PÂS-11‫س‬ label1.caption=sum(‫ج‬ text1.text=avg(‫ب‬ text1.text=sum (‫أ‬ ---------------------------------------------------------------------------------------------------------------:H #‫ض  ا‬#‫ ا‬F‫( ه‬12‫س‬ w) ‫ي‬F01 "#‫ة ا‬#‫اآ‬O‫ < ا‬str G>% ‫^" ا‬z <FCQ < ‫ب‬F>0‫ت ا) < دة ا‬D‫ در‬JI= H #%(‫أ‬ ."q>F‫وي ا ل"أي ا‬1 ‫ أو‬JI1 ‫ت ا) ا‬D‫ا  ة؛ و›  در‬5‫ف و‬FC†4 ‫ي‬F01 "#‫ة ا‬#‫اآ‬O‫ < ا‬str G>% ‫^" ا‬z <FCQ < ‫ب‬F>0‫ت ا) < دة ا‬D‫ در‬JI= H #% (‫ب‬ ."q>F‫ ا ل"أي ا‬JI1 ‫ت ا) ا‬D‫ا  ة؛ و›  در‬4‫ف و‬FC†5 w)

‫ي‬F01 "#‫ة ا‬#‫اآ‬O‫ < ا‬str G>% ‫^" ا‬z <FCQ < ‫ب‬F>0‫ت ا) < دة ا‬D‫ در‬JI= H #% (‫ج‬ ."q>F‫وي ا ل"أي ا‬1 ‫ أو‬JI1 ‫ت ا) ا‬D‫ا  ة؛ و›  در‬4‫ف و‬FC†5 w)

‫ب‬F>0‫ول دة ا‬M‫ف ا ور ا‬2003 ‫ن‬0 S )™>M‫ ا‬/P‫ا‬

j‫ف ا ور ا‬2003 ‫ن‬0 ‫ ا‬2e  ‫ا  ام‬:‫  إ

اد رس ادة‬

- 19 -


-:B=A+10 ‫) ا‬3‫^ ا‬1 ‫ ذا‬-1‫س‬ .b>  2‫ج(آ‬- B#) H1^‫‚ ا‬Q=1‫ و‬10c%A#‫دة  ا‬J‫ – ب(ز‬10c% B#‫دة  ا‬J‫أ(ز‬

------------------------------------------------------------------------------------------------Private Sub Form_Load() For i = 100 To 200 Step 2 Print i Next i End Sub

-:F‫ ا ه‬H #‫ض  ا‬#‫ ا‬-2‫س‬ .D‫و‬I‫ ا(

اد ا‬D  ›(‫أ‬ .200‫و‬100 % ‫رة‬FQ0‫ب(›  ا(

اد ا‬ 200‫و‬100 % ‫رة‬FQ0‫ ا‬D‫و‬I‫ج(›  ا(

اد ا‬

Private Sub Form_Load() ANS$ = "YES" A=1 Do While (ANS$ = "YES") Print A, A ^ 2 A=A+2 If (A >= 10) Then ANS$ = "NO" End If Loop End Sub (‫ج‬

-:OC^‫ ا‬H1 F‫ ا و  ه‬$‫ ا‬H #‫ ا‬1 -3‫س‬

-------------------------------------------------------------------------------------------------

11 39

11 93

5 25 7 49 9 81

25 5 49 7

(‫ب‬ 1 3 5 7 9

819

Private Sub Form_Load() For I = 5 To 1 Step -1 For j = 5 To I Step -1 Print j; Next j Print Next I End Sub

4 4 4 4

3 3 3

2 2

-:OC^‫ ا‬H1 F‫ ا و  ه‬$‫ ا‬H #‫ ا‬1 -4‫س‬

(‫ب‬ 1 12 123 1234 12345

1

Private Sub Form_Load() REM‫ أ‬H #‫š ا‬1‫ آ‬G>‫ا‬  ‫  ام‬ ‫ا‬:‫  إ

اد رس ادة‬ H = InputBox("‫ع‬C1‫ر‬S‫ا‬ 2@‫)"اد‬ B = InputBox("‫

ة‬c‫ ا‬2@‫)"اد‬ area = 1 / 2 * B * H

1 9 25 49 81

--------------------------------------------------------

(‫ج‬ 5 5 5 5 5

(‫أ‬

(‫أ‬ 5 54 543 5432 54321

-:H #‫ا ا‬O‫>™) ا  @ل ه‬M‫š  ا‬D‫ أ‬-5‫س‬ - 20 -


โ€ซุณโ€ช -1โ€ฌู‡โ€ช Fโ€ฌุงโ€ช#โ€ฌุถ  ุงโ€ช-:H #โ€ฌโ€ฌ โ€ซุฃ(ุฅโ€ช3Jโ€ฌุฏ โ€ช eโ€ฌุงโ€ช.2โ€ฌโ€ฌ โ€ซุจ(ุฅโ€ช3Jโ€ฌุฏ โ€ช eโ€ฌุงโ€ช.ยญ)jโ€ฌโ€ฌ โ€ซุฌ(ุฅโ€ช3Jโ€ฌุฏ โ€ช eโ€ฌุงโ€ช.ย%#โ€ฌโ€ฌ โ€ซโ€ช----------------------------------------------------------โ€ฌโ€ฌโ€ซุณโ€ช -2โ€ฌู‡โ€ช Fโ€ฌุงโ€ช#โ€ฌุถ  โ€ช-:rem )Dโ€ฌโ€ฌ โ€ซโ€“ุจ(โ€ช 1โ€ฌุง>โ€ช Gโ€ฌุขโ€ช ยš1โ€ฌุงโ€ชโ€“ .H #โ€ฌุฌ(ุขโ€ช.b>  2โ€ฌโ€ฌ โ€ซุฃ(โ€ช bzF1โ€ฌุงโ€ช.H #โ€ฌโ€ฌ โ€ซโ€ช-------------------------------------------------------------------------------------------------------------โ€ฌโ€ฌโ€ซุฌ( โ€ชb , hโ€ฌโ€ฌ โ€ซุจ( โ€ชarea , hโ€ฌโ€ฌโ€ซุณโ€ช-3โ€ฌุงุช )โ€ช H #โ€ฌู‡โ€ช -:โ€ฌุฃ( โ€ชarea , bโ€ฌโ€ฌ โ€ซโ€ช-------------------------------------------------------------------------------------------------------------โ€ฌโ€ฌโ€ซุณโ€ช ;J-4โ€ฌุฅยœ< ุงโ€ช )3โ€ฌุงโ€ช 0ยœFโ€ฌุงโ€ชF; print )D wโ€ฌู† โ€ชOP%โ€ฌุง ุงโ€ช" -:2;mโ€ฌุงโ€ช eโ€ฌู‡ " โ€ช: print area ,โ€ฌโ€ฌ โ€ซโ€“ุจ( @ย„โ€ช.โ€ฌโ€ฌ โ€ซุฃ( ย†|โ€ช.โ€ฌโ€ฌ โ€ซโ€ช-------------------------------------------------------------------------------------------------------------โ€ฌโ€ฌโ€ซโ€“ุจ( @ย„โ€ช.โ€ฌโ€ฌ โ€ซุณโ€ช H1 w) #zย“1 REM )D-5โ€ฌูˆ โ€ช 2โ€ฌุงโ€ช -: H #โ€ฌุฃ( ย†|โ€ช.โ€ฌโ€ฌ โ€ซโ€ช-------------------------------------------------------------------------------------------------------------โ€ฌโ€ฌโ€ซุณโ€ช ^ -6โ€ฌุง>= ุงู… ุงโ€ช H #โ€ฌุงโ€ชF;1 rt G>% #Cโ€ฌู† โ€ช )Dโ€ฌุงโ€ช

>Sโ€ฌุก โ€ชOP%โ€ฌุง ุงโ€ชCall rt ( h , b , area )-:2;mโ€ฌโ€ฌ โ€ซุจ(ย†|โ€ช.โ€ฌโ€ฌ โ€ซุฃ( @ย„โ€ช.โ€ฌโ€ฌ โ€ซโ€ช-------------------------------------------------------------------------------------------------------------โ€ฌโ€ฌโ€ซุณโ€ช ^ -7โ€ฌุง>= ุงู… ุฅโ€ช#Dโ€ฌุงุก ุฏุง โ€ชF;1โ€ฌู† โ€ช )Dโ€ฌุงโ€ช

>Sโ€ฌุก โ€ชOP%โ€ฌุง ุงโ€ชprint area( h , b )-:2;mโ€ฌโ€ฌ โ€ซุจ(ย†|โ€ช.โ€ฌโ€ฌ โ€ซุฃ( @ย„โ€ช.โ€ฌโ€ฌ โ€ซโ€ช-------------------------------------------------------------------------------------------------------------โ€ฌโ€ฌโ€ซุณโ€ช fales  autoRedrawย†@ #1 ยš3J-8โ€ฌุงโ€ช ^ true wโ€ฌุฅโ€ชPร‚โ€ฌุฑ โ€ช H1โ€ฌุง^โ€ช w) OCโ€ฌุง^โ€ชFโ€ฌุฐุฌ โ€ช-:โ€ฌโ€ฌ โ€ซุจ(ย†|โ€ช.โ€ฌโ€ฌ โ€ซุฃ( @ย„โ€ช.โ€ฌโ€ฌ โ€ซโ€ช-------------------------------------------------------------------------------------------------------------โ€ฌโ€ฌโ€ซุณโ€ช ^ -9โ€ฌุง>= ุงู… โ€ช ย%#โ€ฌุง^ย‚ โ€ชPร‚Sโ€ฌุฑ ุง^โ€ชF;J H1โ€ฌู† โ€ชOP%โ€ฌุง ุงโ€ชText1.text=area -:2;mโ€ฌโ€ฌ โ€ซุจ(ย†|โ€ช.โ€ฌโ€ฌ โ€ซุฃ( @ย„โ€ช.โ€ฌโ€ฌ โ€ซโ€ช-------------------------------------------------------------------------------------------------------------โ€ฌโ€ฌโ€ซโ€“ุจ(@ย„โ€ช.โ€ฌโ€ฌ โ€ซุณโ€ช ;J-10โ€ฌุขโ€ช %โ€ฌู‡โ€ชOโ€ฌุง ุงโ€ช =>% H #โ€ฌุงู… ุงุฏูˆุงุช ุงโ€ช $โ€ฌุงโ€ช -: "#โ€ฌุฃ(ย†|โ€ช.โ€ฌโ€ฌ โ€ซโ€ช-------------------------------------------------------------------------------------------------------------โ€ฌโ€ฌโ€ซุงโ€ช /Pโ€ฌุงโ€ช0 S )ย™>Mโ€ฌู† โ€ช2003โ€ฌู ุง ูˆุฑ ุงโ€ช jโ€ฌุฏุฉ ุงโ€ชF>0โ€ฌุจโ€ฌ

โ€ซโ€ช 2eโ€ฌุง โ€ช0โ€ฌู† โ€ช2004โ€ฌู ุง ูˆุฑ ุงโ€ชMโ€ฌูˆู„โ€ฌ โ€ซุณโ€ชF= -1โ€ฌุงุช ุงโ€ชFโ€ฌุงโ€ช ยšDโ€ฌุฅโ€ช ^ P 1โ€ฌุฅโ€ช3Jโ€ฌุฏ โ€ช3f%  );m 2eโ€ฌุฒ โ€ช bJ#ย›  P 3 #% 2โ€ฌุงโ€ชยš>0โ€ฌุŸโ€ฌ โ€ซุงโ€ช #.โ€ฌุง;ุจ ย†โ€ช.170Cโ€ฌโ€ฌ โ€ซุณโ€ช ย™% I1-2โ€ฌุงโ€ช $โ€ฌุงโ€ช % "#โ€ฌุฉ โ€ชIโ€ฌุงุช  ย†ย‡  ุงโ€ช $โ€ฌุงโ€ช-: c%โ€ฌโ€ฌ โ€ซุณโ€ช(1-2โ€ฌุงุฐุขโ€ชI #โ€ฌุงุช ู‡โ€ช ย…Oโ€ฌุงย™โ€ช-:โ€ฌโ€ฌ โ€ซโ€ช. /01 21 -1โ€ฌู… ุงโ€ชwindows 2mโ€ฌโ€ฌ โ€ซโ€ช -2โ€ฌุฅ ; ุง>= ุงู… ุง) ุงโ€ช) < %#โ€ฌุช ุง(ุฏ@ู„ ูˆุง(@โ€ช#โ€ฌุงุฌ โ€ช.โ€ฌโ€ฌ โ€ซโ€ชFDF% I1 -3โ€ฌุฏ โ€ชF  GD# H #%โ€ฌุน ุงโ€ช ) #Cโ€ฌุงโ€ชFCโ€ฌุฑโ€ช. ( Jโ€ฌโ€ฌ โ€ซโ€ช $)1 -4โ€ฌุง โ€ช  Jโ€ฌุงโ€ชMโ€ฌุฏูˆุงุช ุง โ€ช ;1โ€ฌุงโ€ช GQ1  H #โ€ฌูˆุงโ€ชOD PDโ€ฌุงโ€ช )P> %โ€ฌุงโ€ช>Sโ€ฌู„ โ€ช.โ€ฌโ€ฌ โ€ซโ€ช F.^ GQ1 ;J -5โ€ฌุช ูˆโ€ช#%โ€ฌุง โ€ช. P@  ) Hโ€ฌโ€ฌ โ€ซโ€ช )P> -6โ€ฌุงโ€ช GPCโ€ฌูˆุงโ€ช>Sโ€ฌู„ โ€ช.โ€ฌโ€ฌ โ€ซโ€ชF G

1 PM -7โ€ฌุง

ุงุช โ€ช.โ€ฌโ€ฌ โ€ซุณโ€ช

(2-2โ€ฌุฏ ;โ€ชFโ€ฌุช ุงโ€ช Zmโ€ฌุงโ€ชOP e<Sโ€ฌุง ุงโ€ช .H #โ€ฌุงโ€ช #.โ€ฌุง;ุจ ย†โ€ช.790Cโ€ฌโ€ฌ

โ€ซุณโ€ช-3โ€ฌุงโ€ช  ยšDโ€ฌุงโ€ช )ย™>Mโ€ฌุง  @ู„ ุง=โ€ชFโ€ฌุงุฑุฒ โ€ช-:โ€ฌโ€ฌ โ€ซโ€ช- 21 -โ€ฌโ€ฌ

โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ช:โ€ฌุง  ุงู… โ€ฌ


‫‪-1‬ا‪ %‬أ‬ ‫‪ -2‬دع ع=‪1‬‬ ‫س‪ -1‬ه‪ F‬ا‪#‬ض  ه‪O‬ا ا=‪F‬ارز ‪-:‬‬ ‫‪ -3‬أآš ع‬ ‫أ(›  ا‪

M‬اد ا‪ 1  00Q‬إ‪.10 w‬‬ ‫‪ -4‬ا‪ še‬ع = ع ‪" 2 +‬أي أœ‪ 2 °‬إ‪  w‬ع"‬ ‫ب(›  ا‪

M‬اد ا‪#C‬د‪ 1  J‬إ‪.10 w‬‬ ‫‪-5‬رن ع  ‪10‬‬ ‫ج(›  ا‪

M‬اد ا‪I‬و‪ 1  D‬إ‪.10 w‬‬ ‫إذا آن ) ع أ†‪  #‬أو ‪1‬وي ‪( 10‬ار‪ D‬إ‪ w‬ا=‪F‬ة ر‪3 G‬‬ ‫‪ ----------------------------------------------‬و إ‪ S‬ا>‪ #‬إ‪ w‬ا=‪F‬ة ر‪6 G‬‬‫س‪  -2‬ه‪ F‬ا‪#‬ض  ‪ )D‬ع=ع‪-:2+‬‬ ‫‪.°F1-6‬‬ ‫أ(إ‪3J‬د ‪ D 2†e‬ا‪

M‬اد ا‪#C‬د‪.J‬‬ ‫ب(إ‪3J‬د ‪ D 2†e‬ا‪

M‬اد ا‪I‬و‪.D‬‬ ‫ج(‪JI‬دة  ع ‪ 21 ; 2c%‬آ اد ‪ )  °FJ‬ا  ^  ‪F;1‬ن  ع أآ‪.10 #‬‬ ‫‪-------------------------------------------------------------------------------------------------------------‬‬‫ب(@„‪.‬‬‫أ( †|‬ ‫س‪ ;J-3‬ا‪^>S‬ء  ا=‪F‬ة ر‪-:2 G‬‬ ‫‪-------------------------------------------------------------------------------------------------------------‬‬‫س‪ -4‬ذا ‪ 0J‬ث إذا ا> ً‪ S‬ا=‪F‬ة ر‪ )3% 4 G‬ع= ع ‪-: 1+‬‬ ‫أ(›  ا‪

S‬اد ا‪I‬و‪– .D‬ب(›  ا‪

S‬اد ا‪ 00Q‬ا‪FQ0‬رة ‪1 %‬و‪-10‬ج(›  ‪F3‬ع ا‪

S‬اد ا‪#C‬د‪.J‬‬ ‫‪-------------------------------------------------------------------------------------------------------------‬‬‫س‪ -5‬ا=‪ q‬ا‪F=) %S‬ارز  ه‪-:F‬‬

‫أ‬

‫‪yes‬‬

‫اا‬

‫اا‬

‫دع ع=‪1‬‬

‫دع ع=‪1‬‬

‫اآ ع‬

‫اآ ع‬

‫ع=ع‪2+‬‬

‫ع=ع‪2+‬‬

‫ع=>‪10‬‬

‫‪yes‬‬

‫ع=>‪10‬‬

‫‪no‬‬ ‫‬

‫ب‬

‫‪no‬‬ ‫‬

‫‪--------------------------------------------------------------------------------------------------------------‬‬

‫أ‪  šD‬ا‪ )™>M‬ا  @ل ه‪O‬ا ا‪-:H #‬‬ ‫)(‪Private Sub Form_Load‬‬ ‫) "اد@‪ 2‬ا‪X%= InputBox("c‬‬ ‫  ام ‬ ‫ رس ادة‪:‬ا‬ ‫اد@‪ 2‬إ

اد‬ ‫)" ‬ ‫ ‪- 22‬‬‫‪Y! = InputBox‬‬ ‫ا‪("c‬‬ ‫!‪Z! = X! * Y‬‬ ‫)!‪C! = 2 * (X! + Y‬‬


-:H #โ€ซุถ  ุงโ€ฌ#โ€ซ ุงโ€ฌFโ€ซ ู‡โ€ฌ-1โ€ซุณโ€ฌ ._0 โ€ซ)ยญ ูˆโ€ฌjโ€ซ ุงโ€ฌe โ€ซุฏโ€ฌ3Jโ€ซุฃ(ุฅโ€ฌ ._0 โ€ซย ูˆโ€ฌ%#โ€ซ ุงโ€ฌe โ€ซุฏโ€ฌ3Jโ€ซุจ(ุฅโ€ฌ ._0 โ€ซ ูˆโ€ฌ2โ€ซ ุงโ€ฌe โ€ซุฏโ€ฌ3Jโ€ซุฌ(ุฅโ€ฌ -----------------------------------------------.b> 2โ€ซ โ€“ุฌ(ุขโ€ฌC!,Z!(โ€ซุจโ€ฌ- X!,Y!-(โ€ซ ุฃโ€ฌ-: โ€ซ ู‡โ€ฌH #โ€ซุง ุงโ€ฌOP โ€ซุงุชโ€ฌ-2โ€ซุณโ€ฌ ----------------------------------------------Text1.text=Z! 2;mโ€ซุง ุงโ€ฌOP% โ€ซู†โ€ฌF;J Z!  H1^โ€ซุฑ ุงโ€ฌPร‚( ย‚^โ€ซย ุงโ€ฌ%# โ€ซ ^ ุง>= ุงู…โ€ฌ-3โ€ซุณโ€ฌ .ย„@(โ€ซุจโ€ฌ |ย† (โ€ซุฃโ€ฌ ---------------------------------------------------------------------------------------------------------ยญ)jโ€ซ ุงโ€ฌq0 โ€ซุฏโ€ฌ3Jโ€ซโ€“ุจ(ุฅโ€ฌ 2โ€ซ ุงโ€ฌe โ€ซุฏโ€ฌ3Jโ€ซ ุฃ(ุฅโ€ฌ:C=2*(X+Y) )D  โ€ซุถโ€ฌ#โ€ซ ุงโ€ฌFโ€ซ  ู‡โ€ฌ-4โ€ซุณโ€ฌ .2โ€ซ ุงโ€ฌq0 โ€ซุฏโ€ฌ3Jโ€ซุฌ(ุฅโ€ฌ-

---------------------------------------------------------------------------------------------------------H #โ€ซ;ยš ุงโ€ฌJ H #โ€ซ ุงโ€ฌJโ€ซ ุงโ€ฌ% < โ€ซุงุชโ€ฌ#โ€ซ ูˆู‡ ุง( ู†  ุงโ€ฌjโ€ซ ุงโ€ฌcJ#โ€ซ>= ุงู… ุงโ€ฌ% โ€ซุงุชโ€ฌ#โ€ซ ยฌ ู†  ุงโ€ฌ-5โ€ซุณโ€ฌ -: 2;mโ€ซุง ุงโ€ฌOP% Private Sub Form_Load() DIM X AS integer ย„@(โ€ซุจโ€ฌ |ย† ( โ€ซุฃโ€ฌ Dim y,Z,C as single X = InputBox("cโ€ซ ุงโ€ฌ2@โ€ซ) "ุงุฏโ€ฌ Y = InputBox("cโ€ซ ุงโ€ฌ2@โ€ซ)"ุงุฏโ€ฌ Z=X*Y C = 2 * (X + Y) Print Z Print C End Sub -----------------------------------------------------------------------------: 2;mโ€ซุง ุงโ€ฌOP% โ€ซู†โ€ฌF;1 PRINT )D โ€ซ>= ุงู…โ€ฌ% eโ€ซ  ุงโ€ฌยฐย†โ€ซ ุฃุฑุฏ ูˆโ€ฌF -6โ€ซุณโ€ฌ PRINT Z, " โ€ซ ู‡โ€ฌeโ€ซ ุฌ(" ุงโ€ฌTEXT1.TEXT =" โ€ซ ู‡โ€ฌeโ€ซุจ(" ุงโ€ฌ PRINT Z, (โ€ซุฃโ€ฌ ----------------------------------------------------------------------------------------------------: 2;mโ€ซุง ุงโ€ฌOP% โ€ซู†โ€ฌF;1 ยฐย†โ€ซย ูˆโ€ฌ%# )D โ€ซ>= ุงู…โ€ฌ% eโ€ซ  ุงโ€ฌยฐย†โ€ซ ุฃุฑุฏ ูˆโ€ฌF -6โ€ซุณโ€ฌ command1.caption= " โ€ซ ู‡โ€ฌeโ€ซุจ( "ุงโ€ฌ Label1.text= " โ€ซ ู‡โ€ฌeโ€ซุฃ("ุงโ€ฌ Label1.caption= " โ€ซ ู‡โ€ฌeโ€ซุฌ( "ุงโ€ฌ ----------------------------------------------------------------------------------------------------: 2;mโ€ซุง ุงโ€ฌOP% โ€ซู†โ€ฌF;1 0ยœF1 )D โ€ซ>= ุงู…โ€ฌ% eโ€ซ  ุงโ€ฌยฐย†โ€ซ ุฃุฑุฏ ูˆโ€ฌF -7โ€ซุณโ€ฌ print Z, " โ€ซ ู‡โ€ฌeโ€ซุฌ( "ุงโ€ฌ print Z, โ€ซ ู‡โ€ฌeโ€ซุจ( ุงโ€ฌ print Z, ' โ€ซ ู‡โ€ฌeโ€ซุฃ('ุงโ€ฌ โ€ซุจโ€ฌF>0โ€ซูˆู„ ุฏุฉ ุงโ€ฌMโ€ซู ุง ูˆุฑ ุงโ€ฌ2004 โ€ซู†โ€ฌ0 S )ย™>Mโ€ซ ุงโ€ฌ/Pโ€ซุงโ€ฌ

-: c%โ€ซุช ุงโ€ฌ0 Sโ€ซุกุช < ุงโ€ฌD โ€ซ;ู„ ุงโ€ฌZMโ€ซุงโ€ฌ -: OC^โ€ซ ุงโ€ฌH1 ยšโ€ซ ูˆุฃุขโ€ฌ1Sโ€ซ ุงโ€ฌ$โ€ซ ุงโ€ฌH โ€ซุงโ€ฌ#% ย1  โ€ซุง  ุงู…โ€ฌ:โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ฌ

- 23 -

-: jโ€ซูˆู„ ูˆ ุง ูˆุฑ ุงโ€ฌMโ€ซ ุง ูˆุฑ ุงโ€ฌ2004 โ€ซู†โ€ฌ0 โ€ซุงโ€ฌ


Private Sub Form_Load() Fact = 1 A=1 Do While (A <= 5) Fact = Fact * A A=A+1 Loop Print Fact End Sub

(1

Private Sub Form_Load() For N = 1 To 5 For M = N To 5 -:Fâ&#x20AC;ŤŘ°ŘŹ Ů&#x2021;â&#x20AC;ŹF^â&#x20AC;Ť اâ&#x20AC;Źw) #P.J â&#x20AC;ŤŮ&#x160;â&#x20AC;ŹOâ&#x20AC;Ť اâ&#x20AC;ŹH1^â&#x20AC;Ť اâ&#x20AC;ŹPrint M; Next M Print Next N End Sub

(2

Private Sub Form_Load() Sum = 0 N=2 Do Until (N >= 10) -:Fâ&#x20AC;ŤŘ°ŘŹ Ů&#x2021;â&#x20AC;ŹF^â&#x20AC;Ť اâ&#x20AC;Źw) #P.J â&#x20AC;ŤŮ&#x160;â&#x20AC;ŹOâ&#x20AC;Ť اâ&#x20AC;ŹH1^â&#x20AC;Ť اâ&#x20AC;ŹSum = Sum + N N=N+2 Loop Print N, Sum End Sub

(3

Private Sub Form_Load() For K = 1 To 10 Step 2 If (K = 5) Then Print "" Else Print K End If Next K End Sub

(4

120 -:Fâ&#x20AC;ŤŘ°ŘŹ Ů&#x2021;â&#x20AC;ŹF^â&#x20AC;Ť اâ&#x20AC;Źw) #P.J â&#x20AC;ŤŮ&#x160;â&#x20AC;ŹOâ&#x20AC;Ť اâ&#x20AC;ŹH1^â&#x20AC;ŤŘ§â&#x20AC;Ź

12345 2345 345 45 5

10

20

1 3

-:Fâ&#x20AC;ŤŘ°ŘŹ Ů&#x2021;â&#x20AC;ŹF^â&#x20AC;Ť اâ&#x20AC;Źw) #P.J â&#x20AC;ŤŮ&#x160;â&#x20AC;ŹOâ&#x20AC;Ť اâ&#x20AC;ŹH1^â&#x20AC;ŤŘ§â&#x20AC;Ź

7 9

-: OC^â&#x20AC;Ť اâ&#x20AC;ŹH1 Â&#x161;â&#x20AC;Ť Ů&#x2C6;أآâ&#x20AC;Ź1Sâ&#x20AC;Ť اâ&#x20AC;Ź$â&#x20AC;Ť اâ&#x20AC;ŹH â&#x20AC;ŤŘ§â&#x20AC;Ź#% Â?1 r C  â&#x20AC;ŤŘ§  اŮ&#x2026;â&#x20AC;Ź:â&#x20AC;Ť  ŘĽ

اد عس اŘŻŘŠâ&#x20AC;Ź C C

- 24 -

-:â&#x20AC;ŤŮ&#x2C6;Ů&#x201E;â&#x20AC;ŹMâ&#x20AC;Ť ا Ů&#x2C6;Řą اâ&#x20AC;Ź2005 â&#x20AC;ŤŮ&#x2020;â&#x20AC;Ź0 â&#x20AC;ŤŘ§â&#x20AC;Ź

Private Sub Form_Load() For i = 1 To 5 For j = 1 To 5 If (i = j) Then


-:Fโ€ซุฐุฌ ู‡โ€ฌF^โ€ซ ุงโ€ฌw) #P.J โ€ซูŠโ€ฌOโ€ซ ุงโ€ฌH1^โ€ซุงโ€ฌ

print "r" )3โ€ซ ู„ ุงโ€ฌ% print "r"; )3โ€ซยฏ ^  ูˆยœย ุงโ€ฌe -: 2;mโ€ซุง ุงโ€ฌOP% %D(โ€ซู† ุงโ€ฌF;1 print )D ย ย›Fc^ )ย†< โ€ซุฏโ€ฌFDโ€ซุฃูŠ ูˆโ€ฌ

rcccc crccc ccrcc cccrc ccccr print "r" )3โ€ซ ู„ ุงโ€ฌ% print "r", )3โ€ซยฏ ^  ูˆยœย ุงโ€ฌe -: 2;mโ€ซุง ุงโ€ฌOP% %D(โ€ซู† ุงโ€ฌF;1 print )D ย Jโ€ซุฏ <ย†) ุฏโ€ฌFDโ€ซุฃูŠ ูˆโ€ฌ r c c c c

-: OC^โ€ซ ุงโ€ฌH1 ยšโ€ซ ูˆุฃุขโ€ฌ1Sโ€ซ ุงโ€ฌ$โ€ซ ุงโ€ฌH โ€ซุงโ€ฌ#% ย1

F

 โ€ซ  ุงู…โ€ฌ F โ€ซุงโ€ฌ:โ€ซุงุฏุฉโ€ฌ F โ€ซ  ุฅ

ุงุฏ ุฑุณโ€ฌ

F

F

F

- 25 -

c r c c c

c c r c c

c c c r c

c c c c r

-: jโ€ซูˆู„ ูˆุงโ€ฌMโ€ซ ุง ูˆุฑ ุงโ€ฌ2008- 2007-2006 โ€ซู†โ€ฌ0 โ€ซุงโ€ฌ Private Sub Form_Load() (1 For i = 1 To 5 For j = 1 To i Print "F",


#P.J â&#x20AC;ŤŮ&#x160;â&#x20AC;ŹOâ&#x20AC;Ť اâ&#x20AC;ŹH1^â&#x20AC;ŤŘ§â&#x20AC;Ź -:Fâ&#x20AC;ŤŘ°ŘŹ Ů&#x2021;â&#x20AC;ŹF^â&#x20AC;Ť اâ&#x20AC;Źw)

1 2 3 4 5

* * * * *

2 4 6 8 10

3 6 9 9 15

* * * *

2 16 36 64

4 8 12 16 20

* * *

Private Sub Form_Load() (2 For I = 1 To 5 For J = 1 To 5 #P.J â&#x20AC;ŤŮ&#x160;â&#x20AC;ŹOâ&#x20AC;Ť اâ&#x20AC;ŹH1^â&#x20AC;Ť اâ&#x20AC;ŹK = I * J -: Fâ&#x20AC;ŤŘ°ŘŹ Ů&#x2021;â&#x20AC;ŹF^â&#x20AC;Ť اâ&#x20AC;Źw) Print K, Next J â&#x20AC;ŤŮ â&#x20AC;Ź2008-2006Print Next I End Sub

5 10 15 20 25

* *

Private Sub Form_Load() (3 For i = 1 To 5 For j = 1 To i #P.J â&#x20AC;ŤŮ&#x160;â&#x20AC;ŹOâ&#x20AC;Ť اâ&#x20AC;ŹH1^â&#x20AC;Ť اâ&#x20AC;ŹPrint "*", -:Fâ&#x20AC;ŤŘ°ŘŹ Ů&#x2021;â&#x20AC;ŹF^â&#x20AC;Ť اâ&#x20AC;Źw) Next j Print Next i End Sub

*

Private Sub Form_Load() (4 k=0 For i = 0 To 3 k=k+2 If (k < 4) Then #P.J â&#x20AC;ŤŮ&#x160;â&#x20AC;ŹOâ&#x20AC;Ť اâ&#x20AC;ŹH1^â&#x20AC;ŤŘ§â&#x20AC;Ź Print k -:Fâ&#x20AC;ŤŘ°ŘŹ Ů&#x2021;â&#x20AC;ŹF^â&#x20AC;Ť اâ&#x20AC;Źw) #P.J â&#x20AC;ŤŮ&#x160;â&#x20AC;ŹOâ&#x20AC;Ť اâ&#x20AC;ŹH1^â&#x20AC;ŤŘ§â&#x20AC;Ź Else Print k * k End If Next i End Sub

Private Sub Form_Load() Jâ&#x20AC;Ť

ŘŻâ&#x20AC;Ź Â?D 2Â&#x2020;e â&#x20AC;ŤŘŻâ&#x20AC;Ź3J( H #%  Rem â&#x20AC;Ť  اŮ&#x2026;â&#x20AC;Ź â&#x20AC;ŤŘ§â&#x20AC;Ź:â&#x20AC;ŤŘ§ŘŻŘŠâ&#x20AC;Ź â&#x20AC;ŤŘĽ

اد عسâ&#x20AC;Ź Let X% = 7.6 Z! = 4.8

â&#x20AC;ŤŘŞâ&#x20AC;Ź.eâ&#x20AC;Ť اâ&#x20AC;ŹĂ&#x2018;% - 26 -./ â&#x20AC;Ť ŘŁŮ&#x2C6;â&#x20AC;Ź2%3 4$3 567 +â&#x20AC;Ť Ů&#x2C6;â&#x20AC;Ź,)* + rem #$%& "#8@8A â&#x20AC;Ť "ŘŁŮ&#x160;â&#x20AC;Ź#8986 #$%& :â&#x20AC;Ť Ů&#x2C6;Ů&#x2021;â&#x20AC;Ź-<./5=>â&#x20AC;Ť اâ&#x20AC;Ź,8)*


-: โ€ซ ุงโ€ฌH #โ€ซ ุงโ€ฌOC^1 H1 Dโ€ซ ุฃูˆโ€ฌ-:1โ€ซุณโ€ฌ

12.8 -:Fโ€ซย ู‡โ€ฌ3โ€ซ ุงโ€ฌ2ย†e -:2;mโ€ซุง ุงโ€ฌOP% โ€ซุฐุฌโ€ฌF^โ€ซ ุงโ€ฌw) #P.J H1^โ€ซุงโ€ฌ -------------------------------------------------------------------------------------------------: โ€ซ ุงโ€ฌH #โ€ซ ุงโ€ฌOC^1 H1 Dโ€ซ ุฃูˆโ€ฌ-:2โ€ซุณโ€ฌ Private Sub Form_Load() Sum = 0 โ€ซ<

ุฏโ€ฌ# โ€ซ ุง>= ุง _ ุข ุงุฏโ€ฌG1 n#โ€ซ ุงโ€ฌn=0 .c)0โ€ซ ุงโ€ฌwโ€ซ ุฅโ€ฌ/)@โ€ซ ุง ุฏโ€ฌDโ€ซูˆโ€ฌIโ€ซ

ุงุฏ ุงโ€ฌMโ€ซุงโ€ฌ For i = 2 To 200 Step 2 Sum = Sum + i n=n+1 Next i avr = Sum / n Print avr Print i End Sub avr  โ€ซย… ู‡โ€ฌOโ€ซู‡โ€ฌ

101 202

-:2;mโ€ซุง ุงโ€ฌOP% โ€ซุฐุฌโ€ฌF^โ€ซ ุงโ€ฌw) #P.J H1^โ€ซ ุงโ€ฌ-

โ€ซ ยฌ

ุงุฏโ€ฌ%0โ€ซ ุงโ€ฌq>Fโ€ซุฏ ุงโ€ฌ3J( โ€ซ= ู…โ€ฌJ H #โ€ซ ุงโ€ฌ.i #  #@ร†  ย› ย 200โ€ซ ูˆโ€ฌ2 % โ€ซุฑุฉโ€ฌFQ0โ€ซ ุงโ€ฌDโ€ซูˆโ€ฌIโ€ซุงโ€ฌ

 โ€ซย… ู‡โ€ฌOโ€ซู‡โ€ฌ i 2 โ€ซุงโ€ฌ --------------------------------------------------------------------------------------------3 -5 -7 -9 -11 -13 -15

โ€ซุฐุฌโ€ฌF^โ€ซ ุงโ€ฌw) #P.J Private Sub Form_Load() -: โ€ซ ุงโ€ฌH #โ€ซ ุงโ€ฌOC^1 H1 Dโ€ซ ุฃูˆโ€ฌ-:3โ€ซุณโ€ฌ For i = -3 To -15 Step -2 Print i Jโ€ซุฏโ€ฌ#Cโ€ซ

ุงุฏ ุงโ€ฌMโ€ซ   ุงโ€ฌH #% Next i 15-โ€ซ ูˆโ€ฌ3- % โ€ซุฑุฉโ€ฌFQ0โ€ซุงโ€ฌ End Sub

-: 1Sโ€ซยš  ุฃ>ย™) ุงโ€ฌDโ€ซ ุง ุงโ€ฌH #%  -:4โ€ซุณโ€ฌ  โ€ซุง  ุงู…โ€ฌ:โ€ซ  ุฅ

ุงุฏ ุฑุณ ุงุฏุฉโ€ฌ

- 27 -


Private Sub Form_Load() I=22 Do while(i<=30) Sum=sum+i I=i+1 Loop Print sum End Sub ›(‫أ‬-: H #%  ‫ض‬#‫ا‬-:1‫س‬ .30‫ و‬22 % D‫و‬I‫

اد ا‬M‫ع ا‬F3  ›(‫ب‬-30 w‫ إ‬22 ‫

اد‬M‫ا‬ ‫ع‬F3 ---------------------------------------------------------------------------------------------------------------:‫

اد‬M‫ ا‬J ‫ف‬F> H #‫ <„ن ا‬sum=sum+I )D ‫ ل‬% print I )D ^œ‫إذ و‬-:2‫س‬ .30‫ و‬22 % ‫رة‬FQ0‫

اد ا‬M‫ج(ا‬30 w‫ إ‬22  D‫و‬I‫

اد ا‬M‫–ب(ا‬ 30 w‫ إ‬22  J‫د‬#C‫أ(ا‬ ---------------------------------------------------------------------------------------------------------------:J ‫ف‬F> H #‫ <„ن ا‬do while(i<30) w‫ط إ‬#m‫ ا‬#% ^ ‫إذا‬-:3‫س‬ .30‫ و‬22 % ‫رة‬FQ0‫ج(ا(

اد ا‬- 29‫ و‬22 % ‫رة‬FQ0‫– ب( ا(

اد ا‬30‫ و‬22 % ‫رة‬FQ0‫أ( ا(

اد ا‬ ---------------------------------------------------------------------------------------------------------------:‫م‬FcJ ‫ف‬F> H #‫ <„ن ا‬i=i+1 ‫ ل  اد‬% i=i+2 ‫إذ وœ^ اد‬-:4‫س‬ 30‫ و‬22 % D‫و‬I‫

اد ا‬M‫ع ا‬F3  ›(‫ب‬30‫ و‬22 % ‫

اد‬M‫ع ا‬F3  ›(‫أ‬ .30w‫ا‬22 J‫د‬#C‫

اد ا‬M‫ع ا‬F3  › (‫ج‬---------------------------------------------------------------------------------------------------------------: 2;m‫ا ا‬OP% ‫ن‬F;1 ‫ط‬#m‫ <„ن  ا‬do-while ‫ ل‬% do-until )D ^ =>‫إذ ا‬-:5‫س‬ Do until (i>30)-(‫ج‬ Do until (i<30)-(‫ب‬ Do until (i<=30)(‫أ‬ ---------------------------------------------------------------------------------------------------------------: 2;m‫ا ا‬OP% š;J H #‫ <„ن ا‬%0‫ ا‬q>F‫ ›)š ^ ا‬F -:6‫س‬ Private Sub Form_Load() .„@ (‫ب‬ |† (‫أ‬ I=22 -------------------------------------------------------------N=0 -:n #‫= م ا‬J -:1-6‫س‬ Do while(i<=30) .c)0‫ ا‬/)@‫

اد ا د‬M‫< ا‬# ‫ب(آ اد‬- I  ‫دة‬JI (‫أ‬ Sum=sum+i -------------------------------------------------------------I=i+1 -: avr #‫= م ا‬J-:2-6‫س‬ N=n+1 . %0‫ ا‬q>F‫د ا‬3J((‫ع ب‬F3‫د ا‬3J( (‫أ‬ Loop -------------------------------------------------------------Avr=sum/n -:‚ %# w) H #‫ ا‬OC^1 H1 ‫ر‬PÂ‫ أرد إ‬F -:3-6‫س‬ Print avr text1.text=avr(‫ج‬- text1.font=avr(‫ب‬ text1.name=avr (‫أ‬ End Sub --------------------------------------------------------------:°†‫ و‬%# w) H #‫ ا‬OC^1 H1^ ًC†‫ر و‬PÂ‫ أرد إ‬F -:4-6‫س‬ label1.text="F‫ ه‬q>F‫ب( "ا‬ label1.backcolor="F‫ ه‬q>F‫أ( "ا‬ label1.caption="F‫ ه‬q>F‫ ج( "ا‬-

-:1S‫>™) ا‬M‫š  ا‬D‫ ا أ‬H #‫  @ل ا‬-1‫س‬ Private Sub Form_Load() Sum = 0 -: ‫ ا‬F0^% m‫ و‬age   ً ‫ آ‬G ‫د@ل‬f% ^ Fn=0 °ÂF‫ ا‬# 2jJ age#‫„ن ا‬% )

age% = InputBox(" °ÂF‫ ا‬# 2@‫)"أد‬ Do While (age% > 0)  ‫ا  ام‬:‫  إ

اد رس ادة‬ - 28 If (age% > 40) Then m = InputBox("°ÂF‫š ا‬1# 2@‫)"أد‬ Sum = Sum + m


°ÂF 2; š1#‫ ا‬2jJ m#‫وا‬ M Age š1‫ا‬#‫ا‬ #‫ا‬ 100 20 300 44 400 53 150 35 200 40 200 60 -: F‫ ه‬avr c H #‫ ا‬OC^1 H1-:1‫س‬ 300(‫ج‬225(‫ب‬900 (‫أ‬ --------------------------------------------------------------------------------------------------------------900(‫ج‬700(‫ب‬1350(‫أ‬ -: F‫ ه‬sum c H #‫ ا‬OC^1 H1 -:2‫س‬ --------------------------------------------------------------------------------------------------------------. ‫ع‬F3‫ وا‬%0‫ ا‬q>F‫ و›  ا‬°ÂF‫š ا‬1‫ ورا‬# ‫اءة‬# (‫ أ‬-:H #‫ض  ا‬#‫ ا‬F‫  ه‬-3‫س‬  #‫ أآ‬G‫ أ ره‬JO‫ ا‬CÂF) ‫ت‬1#‫ع ا‬F3‫ وا‬%0‫ ا‬q>F‫ و›  ا‬°ÂF‫š ا‬1‫ ورا‬# ‫اءة‬# (‫ب‬ JO‫ ا‬CÂF‫ت ا‬1#‫ع ا‬F3‫ وا‬%0‫ ا‬q>F‫ و›  ا‬CÂF‫š ا‬1#‫ وا‬#‫اءة ا‬# (‫ ج‬. #C† .40  JI1 G‫أ ره‬ ---------------------------------------------------------------------------------------------------------------: ‫ن‬F;1 ‫ط‬#m‫ <„ن † ا‬do-while ‫ ل‬% do-until ‫>= ام‬% ^ F -:4‫س‬ Do until (age<=0)-‫ج‬ Do until (age<>0)(‫ب‬ Do until (age<0) (‫أ‬ --------------------------------------------------------------------------------------------------------------sum  PD G1 ‫ ا‬m G ‫<

د‬# ‫ آ اد‬2J(‫  –ب‬#‫ أآ‬JI=(‫ أ‬-:F‫ه‬n#‫ض  ا‬#‫ ا‬-:5‫س‬ ---------------------------------------------------------------------------------------------------------------: ‫ ا‬#C‫اء ا‬#D(‫ض  ا‬#‫ ا‬F‫  ه‬-: ‫š  ا“ال ا‬D‫أ‬ function r(income!,t$) as singl if (t$= "‫وج‬I ")then R=incom!+(12/100*income!) Else R=incom+(7/100*income!) Endif Endfunction

income š1‫ا‬#‫ب †< ا‬0% ‫م‬FcJ #< H #% (‫أ‬ >>S‫š ا‬1‫ا‬#‫  ا‬12%  °`J ­0% 7%  °`J‫وج و‬I °ÂF‫إذا آن ا‬ .‫وج‬I #' °ÂF‫إذا آن ا‬ -------------------------------------------income š1‫ا‬#‫ب †< ا‬0% ‫م‬Fc1 ‫ب( دا‬ >>S‫š ا‬1‫ا‬#‫  ا‬12%  °`J ­0% 7%  °`J‫وج و‬I °ÂF‫إذا آن ا‬ .‫وج‬I #' °ÂF‫إذا آن ا‬ --------------------------------------------------------------------------------------------------------------|†(‫ب‬„@ ( ‫ أ‬-: "#‫ ا‬H #‫ ا‬w‫ إ‬qc< ‫ ة‬e‫  وا‬D#J #C‫اء ا‬#D(‫… ا‬O‫ج( ه‬ -------------------------------b<F‫ح وا‬3^% 3) 1^1  ---------------------------------------

 ‫ا  ام‬:‫  إ

اد رس ادة‬

- 29 -

بعض الاسئلة علي الحاسوب  

بعض الاسئلة علي الحاسوب