Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 88 - Math_Genius_1 2
P. 88

    çksxzke ý% ;g tk¡pus osQ fy, fd mi;ksxdrkZ }kjk fn;k x;k buiqV uacj 100 ls cM+k ;k NksVk gS ;k ughaA

                          ywfiax (Looping)
                      10 ls 1 rd osQ uacjksa dks fçaV djus osQ fy, vki nks rjg ls çksxzke cuk ldrs gSaA vki ;k rks çR;sd vkmViqV dks
                      fçaV djus osQ fy, vyx&vyx funZs'k ns ldrs gSa ;k vkmViqV dks fçaV djus osQ fy, funZs'kksa dk ,d lsV ns ldrs gSaA
                      funZs'kksa dk ;g lsV ,d fuf'pr la[;k osQ fy, ;k ,d oaQMh'ku larq"V gksus rd nksgjk,xkA bls ywfiax dgk tkrk gSA
                      BASIC-256 esa] fdlh çksxzke esa funZs'kksa dh iqujko`fÙk osQ fy, mi;ksx fd, tkus okys dFkuksa dks iqujko`Ùk dFku ;k
                      ywfiax dFku dgk tkrk gSA fdlh ,fIyosQ'ku dks fodflr djus osQ fy, ywfiax LVsVesaV cgqr mi;ksxh vkSj vko';d

                      gSaA BASIC-256 ywfiax LVsVesaV osQ :i FOR...NEXT vkSj WHILE...END WHILE tcfd çnku djrk gSA vkb,]
                      tkusa muosQ ckjs esaA

                          QkWj---usDLV LVsVesaV (For...Next Statement)
                      fdlh dksM dks ,d fuf'pr la[;k esa pykus osQ fy, FOR...NEXT LVsVesaV dk mi;ksx fd;k tkrk gSA bl çdkj osQ

                      ywi dks çcaf/r djus osQ fy,] ge ,d osfj,cy cukrs gSa tks VªSd djrk gS fd ywi fdruh ckj pysxkA vkerkSj ij]
                      bl osfj,cy dks dkmaV oaQVªksy osfj,cy (count control variable) dgk tkrk gSA FOR...NEXT LVsVesaV dk ewy
                      ¯lVSDl bl çdkj gS %

                      FOR counter = startNumber TO endNumber
                             Statements to repeat
                             Increase or decrease the counter variable
                      END
                      tgk¡

                         dkmaVj (counter) ,d osfj,cy gS tks ywi osQ vanj funZs'kksa dks fu"ikfnr djus dh la[;k dh x.kuk djrk gSA
                         LVkVZuacj (startNumber) ywi osQ eku dh 'kq#vkrh la[;k gSA
                         ,aMuacj (endNumber) ywi dks pykus dh oqQy la[;k gSA
                      vkb, ge FOR...NEXT LVsVesaV dh vo/kj.kk dks le>us osQ fy, ,d çksxzke ns•saA

                                                  1 ls 15 uacj rd fizaV djuk (Printing number 1 to 15)

                         86  Play (Ver. 1.0)-VII

| 83 84 85 86 87 88 89 90 91 92 93 |