Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 91 - Math_Genius_1 2
P. 91

    buQkbukbV ywi (Infinite Loop)
                     ,d ywi tks dHkh lekIr ugha gksrk gS mls buiQkbukbV ywi (infinite loop) dgk tkrk gSA çksxzkfeax djrs le; gesa
                     ,slh fLFkfr;ksa ls cpuk pkfg,A ;fn FkksM+h nsj osQ ywi dh fLFkfr xyr (false) ugha gksrh gS] rks ywi ges'kk osQ fy,
                     pyrk gS] ,d vuar ywi cukrk gSA
                     mnkgj.k û%

                     number = 1
                     WHILE (number < 10)
                     PRINT number

                     END WHILE
                     mi;qZDr dk;ZØe dHkh lekIr ugha gksxk D;ksafd la[;k dk eku ges'kk 1 gksrk gS] tks fd 10 ls de gksrk gSA blfy,]
                     ywi vuar ckj fu"ikfnr gksxkA
                                                           oaQI;wVj

                     mnkgj.k ü%
                     WHILE (True)
                     PRINT "Loop Never Ends"                     Kku           ,d ckj tc ywi vius var rd igq¡p tkrk gS]
                     END WHILE                                                 rks ge END WHILE dhoMZ dk mi;ksx ;g

                                                                               laosQr nsus osQ fy, djrs gSa fd ywi lekIr gks
                                                                               tk,xkA bl rjg ywi ges'kk osQ fy, tkjh ugha
                                                                               jgrk gS] ftlls ,d vuar ywi curk gSA

                      vkvks nksgjk,¡

                           BASIC-256 esa fu.kZ; ysuk oaQMh'kuy LVsVesaV~l ;k fu.kZ; ysus okys c;kuksa }kjk fd;k tkrk gS tks dk;ZØe fu"iknu
                            osQ çokg dh fn'kk r; djrs gSaA

                             If-Then dFku ljyre oaQMh'kuy LVsVesaV (conditional statement) gSA
                             If-Then-Else dFku fdlh oaQMh'ku dh tk¡p djrk gSA ;fn fLFkfr dk ewY;kadu lgh gS] rks If LVsVesaV osQ ckn osQ baMsaV
                            LVsVesaV dks fu"ikfnr fd;k tkrk gS] vU;Fkk vU; LVsVesaV osQ ckn baMsaV LVsVesaV dks fu"ikfnr fd;k tkrk gSA

                             fdlh çksxzke esa funZs'kksa osQ ,d lsV dks nksgjkus osQ fy, mi;ksx fd, tkus okys LVsVesaV~l dks iqujko`Ùk dFku (iterative
                            statement) ;k ywfiax LVsVesaV dgk tkrk gSA

                       D;k lh[kk!

                       I. lgh mRrj ij lgh ( ) dk fpg~u yxkb,A
                          1-  WHILE ywi dks lekIr djus osQ fy, fdl dFku dk mi;ksx fd;k tkrk gS\

                             d-  END WHILE                  [k-  WHILE                      x-  END-WHILE
                          2-  fuEufyf•r esa ls dkSu BASIC-256 esa oaQMh'kuy LVsVeasV ugha gS\
                             d-  IF-THEN                    [k-  IF-THEN-ELSE               x-  FOR-NEXT

                          3-  tc ge ywi dkmaV ugha tkurs gSa rks ge fdl ywi LVsVesaV dk mi;ksx djrs gSa\
                             d-  While                      [k-  For                        x-  d vkSj [k nksuksa

                                                                             csfld&256 esa oaQMh'kuy vkSj yw¯ix LVsVesaV~l  89

| 86 87 88 89 90 91 92 93 94 95 96 |