presented by:- m. bandula peiris isa - (ict)_kurunegala education zone

48
Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Upload: randell-palmer

Post on 31-Dec-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Presented by:- M. Bandula PeirisISA - (ICT)_Kurunegala Education Zone

Page 2: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone
Page 3: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Repitition Repitition fyj;a fyj;a LoopingLoopingmqk¾lrK fyj;a mqk¾lrK fyj;a

mqkrdj¾;k md,k jHqyhmqkrdj¾;k md,k jHqyh

Page 4: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

mß.Kl l%uf,aLKhl mß.Kl l%uf,aLKhl (Computer (Computer Program) Statement, Program) Statement, tlla tlla fyda lsysmhla hï lsis fyda lsysmhla hï lsis jdr .Kkla kejk kejk ljdr .Kkla kejk kejk l

%shd;aul lsÍug isÿùu%shd;aul lsÍug isÿùu,, mqk¾lrK fyj;a mqkrdj¾;k mqk¾lrK fyj;a mqkrdj¾;k

(Repitition (Repitition fyj;afyj;a Looping) Looping) md,k jHqyh f,i md,k jHqyh f,i y\y\

qkajkq ,efí'qkajkq ,efí'

Page 5: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

mqk¾lrK fyj;a mqkrdj¾;k mqk¾lrK fyj;a mqkrdj¾;k (Repitition (Repitition fyj;afyj;a Looping) Looping)

md,k jHqyh ksrEmkh flfrk md,k jHqyh ksrEmkh flfrk mß.Kl l%uf,aL mß.Kl l%uf,aL (Computer (Computer

Programs) Programs) wdldr wdldr lsysmhlska bÈßm;a l, lsysmhlska bÈßm;a l,

yelsh'yelsh'

Page 6: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

1.1. For - Next Loop For - Next Loop wdlD;sh'wdlD;sh'2.2. While - Loop While - Loop wdlD;sh'wdlD;sh'3.3. Until - Loop Until - Loop wdlD;sh'wdlD;sh'

Page 7: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

1.1. For - Next Loop For - Next Loop wdlD;shwdlD;sh

Page 8: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

l%shd;auljk jdr .Kk okakd l%shd;auljk jdr .Kk okakd wjia:dj,oS wjia:dj,oS For -Next loop For -Next loop tl tl

fhdod.efka' oS we;s wdrïNl fhdod.efka' oS we;s wdrïNl w.hl isg oS we;s wjidk w.hla w.hl isg oS we;s wjidk w.hla olajd fuu Æmh olajd fuu Æmh (For - Next loop)(For - Next loop)

;=< oS we;s Wmfoia l;=< oS we;s Wmfoia l%shd;aul fõ' %shd;aul fõ'

Page 9: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Loop structures Loop structures hkq Wmfoia kej; hkq Wmfoia kej; kej; l%shd;aul lsrSug fhdod.kq kej; l%shd;aul lsrSug fhdod.kq ,nk m%ldYhls' fuu ,nk m%ldYhls' fuu Wmfoia" ,Qmh ;=< fokq ,nk hï Wmfoia" ,Qmh ;=< fokq ,nk hï lsis w.hla lsis w.hla (Counter value)(Counter value) lrd ,Õd jk ;=re kej; kej; llrd ,Õd jk ;=re kej; kej; l%shd;aul fõ' l%u f,aLh l%shd;aul fõ' l%u f,aLh l%shd;aul jk jdr .Kk %shd;aul jk jdr .Kk looploop countercounter u.ska .Kkh flf¾' u.ska .Kkh flf¾'

Page 10: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Counter Var - mqkrdj¾;kh jk jdr .Kk .Kka lr .ekSu i|yd Ndú;d lrk Integer

Variable tl fufia ye¢kafõ' Start Value -mqkrdj¾;kh jk jdr .Kk .Kka lsrSu wdrïN lrk w.h' End Value - mqkrdj¾;kh jk jdr .Kk .Kka

lsrSu wjidk lrk w.h' Step - mqkrdj¾;kh jk jdr .Kk .Kka lsrSu wdrïN lrk w.h,(Start Value) .Kk .Kka lsrSu wjidk lrk w.h (End Value) f;la jeä úh hq;= fyda wvq úh hq;= jákdlu' (Step tl i|yd w.hla oS fkdue;s kï tys jákdlu tl ne.ska jeäfõ')

For loop tl ,shk wdldrh ^Syntax)

Page 11: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

For <Counter Var> = <Start Value> To <End Value> step <increment or

decrement value>

Statement

Next <Counter Var>

ForFor X = X = 1 1 to to 2020 Step Step 22

PrintPrint X XNext Next X X

For loop tl ,shk wdldrh ^Syntax)

Page 12: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Step Step tl i|yd w.hla oS fkdue;s tl i|yd w.hla oS fkdue;s kï kï fyda fyda th Ok w.hla fõ th Ok w.hla fõ kï kï Start Start Value Value tflys w.hg jvd jeä w.hla tflys w.hg jvd jeä w.hla End End Value Value tlg Èh hq;=h'tlg Èh hq;=h'

Step Step tl i|yd oS we;s w.h RK tl i|yd oS we;s w.h RK w.hla fõ kï w.hla fõ kï Start Value Start Value tflys w.hg jvd tflys w.hg jvd wvq wvq w.hla w.hla End Value End Value tlg Èh tlg Èh hq;=h'hq;=h'

Page 13: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

l%uf,aLh l%shd;aul jk jdr .Kk l%uf,aLh l%shd;aul jk jdr .Kk wdrïNl w.h yd wjidk w.h wdrïNl w.h yd wjidk w.h u.ska ;SrKh flf¾' tfukau tla u.ska ;SrKh flf¾' tfukau tla jrloS by< fyda my< hk w.ho jrloS by< fyda my< hk w.ho Æmh ;=< i|yka l< yelsh' tfia Æmh ;=< i|yka l< yelsh' tfia by< fyda my< hk w.h i|yka lr by< fyda my< hk w.h i|yka lr ke;akï idudkH wdldrhg tla w.hla ke;akï idudkH wdldrhg tla w.hla ne.ska by< fyda my< hhs'ne.ska by< fyda my< hhs'

Page 14: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod 1 ( For X = 1 TO 10Print X Loop bodyNext X

fuys X ys w.h tla jrlg tl ne.ska by< hhs

m<uq jdrfhaoS" X = 1.fojk jdrfhaoS" X = 2. wdoS

f,i oy jk jdrfha oS X ys w.h 10

ù ,Qmh wjika fõ'

Page 15: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

123456789

10

Page 16: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod 2 ( For X = 1 To 10 Step 2Print X Loop BodyNext X

fuys oS X ys w.h jrlg fol ne.ska by< hhs'

m<uq jdrfhaoS X = 1.fojk jdrfhaoS X = 3.

X ys w.h 9 jQ úg Æmh kj;S'

Page 17: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

13579

Page 18: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod 3 (

For X = 10 To 1 Step -2Print X Loop BodyNext Xfuys oS jrloS w.h fol ne.ska my< hhs’m<uq jdrfhaoS X = 10fojk jdrfhaoS X = 8X ys w.h 2 jQ úg Æmh kj;S'

Page 19: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

108642

Page 20: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod 4 ( For X = 1 TO 10Print “Sri Lanka” Loop bodyNext Xfuys X ys w.h tla jrlg tl ne.ska

by< hhs ta wkqj X ys w.h jrlg tl ne.ska jeä jk iEu jdrhla mdidu Sri Lanka hkak Print lrhs' tneúka wjidkfha Sri Lanka hkak oijrla Print lr Æmh wjika fõ'

Page 21: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Sri LankaSri LankaSri LankaSri LankaSri LankaSri LankaSri LankaSri LankaSri LankaSri Lanka

Page 22: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #-For X = 1 TO 10 Print X Loop body Next X

fuys X ys w.h ;ks fma,shg ,efnk fia m%;sodkh ,nd .ekSfï yelshdjo we; ta i|yd l%uf,aLfha my; fjkialu isÿl, hq;=h'For X = 1 TO 10

Print X; Next X

túg m%;sodkh 1 2 3 4 5 6 7 8 9 10 fõ'

Page 23: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #- For i = 1 TO 10Print i, 2*i Next i

Page 24: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #-Dim i as integerDim j as integerPrivate Sub cmdPrint _ Click()For i = 1 to 10

For j = 1 to 5 Print i;

Next jNext iEnd Sub

Page 25: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

1.1. Do While - Loop Do While - Loop wdlD;sh'wdlD;sh'2.2. Do - Loop While Do - Loop While wdlD;sh'wdlD;sh'3.3. Do Until - Loop Do Until - Loop wdlD;sh'wdlD;sh'4.4. Do - Loop Until Do - Loop Until wdlD;sh'wdlD;sh'

Page 26: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Do - Loop UntilDo - Loop UntilwdlD;shwdlD;sh

l%shd;auljk jdr .Kk fkdokakd wjia:dj,oS l%shd;auljk jdr .Kk fkdokakd wjia:dj,oS fhdod.efkk fhdod.efkk mqk¾lrK fyj;a mqkrdj¾;k mqk¾lrK fyj;a mqkrdj¾;k (Repitition (Repitition fyj;afyj;a Looping) Looping) md,k jHqyhkamd,k jHqyhka

Do While - Loop Do While - Loop wdlD;shwdlD;sh

Do - Loop While Do - Loop While wdlD;shwdlD;sh

Do Until - Loop Do Until - Loop wdlD;shwdlD;sh

uq,skauq,ska fldkafoaish i,ld fldkafoaish i,ld n,d n,d fldkafoaish ksjeros fldkafoaish ksjeros kï" Æmh ;=< we;s kï" Æmh ;=< we;s Wmfoia ls%hd;aul fõWmfoia ls%hd;aul fõ

fldkafoaish miqj i,ld fldkafoaish miqj i,ld nef,a' nef,a' fldkafoaish fldkafoaish ksjeros kï" Æmh ;=< ksjeros kï" Æmh ;=< we;s Wmfoia ls%hd;aul we;s Wmfoia ls%hd;aul fõfõ

uq,skauq,ska fldkafoaish i,ld fldkafoaish i,ld n,d n,d fldkafoaish wi;H kï" fldkafoaish wi;H kï" Æmh ;=< we;s Wmfoia Æmh ;=< we;s Wmfoia ls%hd;aul fõls%hd;aul fõ

Fldkafoaish miqj i,ld Fldkafoaish miqj i,ld nef,a' nef,a' fldkafoaish wi;H fldkafoaish wi;H kï" Æmh ;=< we;s kï" Æmh ;=< we;s Wmfoia ls%hd;aul fõWmfoia ls%hd;aul fõ

Page 27: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

DO-While loop Ndú;hfkdokakd jdr .Kkla l%shd;aul úh hq;= Wmfoia iuQyhla l%shd;aul lrùug fuu Æmh ^Do-While loop) fhdod .efka'

úIqj,a fÄisla l%uf,aL NdIdfõ fuu Æmh l%shd;aul jk úg oSwe;s fldkafoaish ksjeros kï" ,Qmh ;=< we;s Wmfoia jrla l%shd;aul ù" kej; fldkafoaish i,ld nef,a' fï wdldrfhka oSwe;s fldkafoaish ksjerosj mj;sk ;dla fuu Æmh l%shd;aul fõ' fuys oSwe;s fldkafoaish i,ld n,d th jeros kï, ,Qmh ;=< we;s ish,qu Wmfoia u.yer hhs' oSwe;s fldkafoaish jerÿkq ú.i Æmh l%shd;aul ùu kj;S'

Page 28: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

uq,skauq,ska fldkafoaish i,ld n,d fldkafoaish i,ld n,d fldkafoaish ksjeros kï" fldkafoaish ksjeros kï" Æmh ;=< we;s Wmfoia lÆmh ;=< we;s Wmfoia l%shd;aul ù" kej; fldkafoaish %shd;aul ù" kej; fldkafoaish i,ld nef,a' fï wdldrfhka oS we;s i,ld nef,a' fï wdldrfhka oS we;s fldkafoaish ksjerosj mj;sk ;dla fldkafoaish ksjerosj mj;sk ;dla fuu Æmh l%shd;aul fõ' fuu Æmh l%shd;aul fõ'

Page 29: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Dim Number As IntegerDim Number As IntegerNumber = 1Number = 1Do While Do While Number <= Number <=

1010Print NumberPrint NumberNumber = Number Number = Number

+ 1+ 1LoopLoop

Wod #- Wod #- 1 isg 10 olajd ixLHd 1 isg 10 olajd ixLHd PrintPrint lr lr .ekSu.ekSu

Page 30: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Do - Loop WhileDo - Loop While uq,skauq,ska ÆÆmhg we;=,a jmhg we;=,a j jrla jrla Æmh ;=< we;s Wmfoia lÆmh ;=< we;s Wmfoia l%shd;aul lr fldkafoaish ksjeros %shd;aul lr fldkafoaish ksjeros kï kej; Æmh ;=< we;s Wmfoia lkï kej; Æmh ;=< we;s Wmfoia l%shd;aul lrhs' fï wdldrfhka %shd;aul lrhs' fï wdldrfhka oSwe;s fldkafoaish ksjerosj oSwe;s fldkafoaish ksjerosj mj;sk;dla fuu Æmh l%shd;aul mj;sk;dla fuu Æmh l%shd;aul fõ' fõ'

Page 31: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Dim Number As IntegerDim Number As IntegerNumber = 1Number = 1DoDo

Print NumberPrint NumberNumber = Number Number = Number

+ 1+ 1Loop While Loop While Number <= 10Number <= 10

Wod #- Wod #- 1 isg 10 olajd ixLHd 1 isg 10 olajd ixLHd PrintPrint lr lr .ekSu.ekSu

Page 32: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Until LoopUntil Loop

Page 33: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Do Until - LoopDo Until - Loop

uq,skauq,ska fldkafoaish i,ld n,d fldkafoaish i,ld n,d fldkafoaish fldkafoaish wi;H wi;H kï Æmh ;=< kï Æmh ;=< we;s Wmfoia l%shd;aul ù" kej; we;s Wmfoia l%shd;aul ù" kej; fldkafoaish i,ld nef,a' fï fldkafoaish i,ld nef,a' fï wdldrfhka oSwe;s fldkafoaish wdldrfhka oSwe;s fldkafoaish wi;Hj mj;sk;dla fuu Æmh lwi;Hj mj;sk;dla fuu Æmh l%shd;aul fõ' %shd;aul fõ'

Page 34: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #- Wod #- 1 isg 10 olajd ixLHd 1 isg 10 olajd ixLHd PrintPrint lr lr .ekSu.ekSu

Dim Number As IntegerDim Number As IntegerNumber = 1Number = 1Do Until Do Until Number > 10Number > 10

Print NumberPrint NumberNumber = Number Number = Number

+ 1+ 1LoopLoop

Page 35: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #-

Dim i as integerX = 1 Do Until X > 10

Print XX = X + 1

Loop

Page 36: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Do - Loop UntilDo - Loop Until uq,skauq,ska ÆÆmhg we;=,a jmhg we;=,a j jrla jrla Æmh ;=< we;s Wmfoia lÆmh ;=< we;s Wmfoia l%shd;aul lr fldkafoaish wi;H %shd;aul lr fldkafoaish wi;H kï kej; Æmh ;=< we;s Wmfoia lkï kej; Æmh ;=< we;s Wmfoia l%shd;aul lrhs' fï wdldrfhka %shd;aul lrhs' fï wdldrfhka oSwe;s fldkafoaish wi;Hj mj;sk oSwe;s fldkafoaish wi;Hj mj;sk ;dla fuu Æmh l%shd;aul fõ' ;dla fuu Æmh l%shd;aul fõ'

Page 37: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Dim Number As IntegerDim Number As IntegerNumber = 1Number = 1DoDo

Print NumberPrint NumberNumber = Number Number = Number

+ 1+ 1Loop Until Loop Until Number > 10Number > 10

Wod #- Wod #- 1 isg 10 olajd ixLHd 1 isg 10 olajd ixLHd PrintPrint lr lr .ekSu.ekSu

Page 38: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #-

Dim i as integeri = 1 Do

Print ii = i + 1

Loop Until i > 10

Page 39: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Until Loop Until Loop Ndú;fhka isÿflfrk Ndú;fhka isÿflfrk mrs.Kl l%uf,aL ;j ÿrg;a mrs.Kl l%uf,aL ;j ÿrg;a

Page 40: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #- Wod #- 1 ;a 50 ;a w;r T;af;a 1 ;a 50 ;a w;r T;af;a ixLHd ixLHd PrintPrint lr .ekSu' lr .ekSu' Do While - Loop Do While - Loop Ndú;hNdú;h

Dim Number As IntegerDim Number As IntegerNumber = 1Number = 1Do While Do While Number <= Number <=

5050Print NumberPrint NumberNumber = Number Number = Number

+ 2+ 2LoopLoop

Page 41: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #- Wod #- 1 ;a 50 ;a w;r T;af;a 1 ;a 50 ;a w;r T;af;a ixLHd ixLHd PrintPrint lr .ekSu' lr .ekSu' Do Until - Loop Do Until - Loop Ndú;hNdú;h

Dim Number As IntegerDim Number As IntegerNumber = 1Number = 1Do Until Do Until Number > 50Number > 50

Print NumberPrint NumberNumber = Number Number = Number

+ 2+ 2LoopLoop

Page 42: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #- Wod #- 1 ;a 50 ;a w;r T;af;a 1 ;a 50 ;a w;r T;af;a ixLHd ixLHd PrintPrint lr .ekSu' lr .ekSu' Do - Loop While Do - Loop While Ndú;hNdú;h

Dim Number As IntegerDim Number As IntegerNumber = 1Number = 1DoDo

Print NumberPrint NumberNumber = Number Number = Number

+ 2+ 2Loop While Loop While Number <= 50Number <= 50

Page 43: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #- Wod #- 1 ;a 50 ;a w;r T;af;a 1 ;a 50 ;a w;r T;af;a ixLHd ixLHd PrintPrint lr .ekSu' lr .ekSu' Do - Loop Until Do - Loop Until Ndú;hNdú;h

Dim Number As IntegerDim Number As IntegerNumber = 1Number = 1DoDo

Print NumberPrint NumberNumber = Number Number = Number

+ 2+ 2Loop Until Loop Until Number > 50Number > 50

Page 44: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #- Wod #- 1 ;a 50 ;a w;r brÜfÜ 1 ;a 50 ;a w;r brÜfÜ ixLHd ixLHd PrintPrint lr .ekSu' lr .ekSu' Do Until - Loop Do Until - Loop Ndú;hNdú;h

Dim Number As IntegerDim Number As IntegerNumber = 2Number = 2Do Until Do Until Number > 50Number > 50

Print NumberPrint NumberNumber = Number Number = Number

+ 2+ 2LoopLoop

Page 45: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #- Wod #- 1 ;a 50 ;a w;r brÜfÜ 1 ;a 50 ;a w;r brÜfÜ ixLHd ixLHd PrintPrint lr .ekSu' lr .ekSu' Do Loop - Until Do Loop - Until Ndú;hNdú;h

Dim Number As IntegerDim Number As IntegerNumber = 2Number = 2DoDo

Print NumberPrint NumberNumber = Number Number = Number

+ 2+ 2Loop Until Loop Until Number > 50Number > 50

Page 46: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #- 1 ;a 100 ;a w;r mQ¾K Wod #- 1 ;a 100 ;a w;r mQ¾K j¾. ixLHd j¾. ixLHd PrintPrint lr .ekSu' lr .ekSu' Do Until - Loop Do Until - Loop Ndú;hNdú;h

Dim x As IntegerDim x As IntegerDim i as IntegerDim i as Integer

x =0x =0i = 1i = 1Do While Do While x < x <

100100x = x + ix = x + iPrint xPrint xi = i + 2i = i + 2

LoopLoop

x = 0 , i = 1x = 0 , i = 1Print x = 1Print x = 1 i = 1 + i = 1 +

2 = 32 = 3Print x = 4Print x = 4 i = 3 + 2 = 5 i = 3 + 2 = 5Print x = 9Print x = 9 i = 5 + 2 = 7 i = 5 + 2 = 7Print x =16Print x =16 i = 7 + 2 = 9 i = 7 + 2 = 9Print x =25Print x =25 i = 9 + 2 = 11 i = 9 + 2 = 11Print x =36Print x =36 i = 11+2 = 13 i = 11+2 = 13Print x =49Print x =49 i = 13+2 = 15 i = 13+2 = 15Print x =64Print x =64 i = 15+2 = 17 i = 15+2 = 17Print x =81Print x =81 i = 17+2 = 19 i = 17+2 = 19Print x =100Print x =100 i = 19+2 = 21i = 19+2 = 21

Page 47: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

Wod #- 1 ;a 100 ;a w;r mQ¾K Wod #- 1 ;a 100 ;a w;r mQ¾K j¾. ixLHd j¾. ixLHd PrintPrint lr .ekSu' lr .ekSu' Do Loop - Until Do Loop - Until Ndú;hNdú;h

Dim x As IntegerDim x As IntegerDim i as IntegerDim i as Integer

x =0x =0i = 1i = 1DoDo

x = x + ix = x + iPrint xPrint xi = i + 2i = i + 2

Loop Until Loop Until x x >= 100>= 100

x = 0 , i = 1x = 0 , i = 1Print x = 1Print x = 1 i = 1 + i = 1 +

2 = 32 = 3Print x = 4Print x = 4 i = 3 + 2 = 5 i = 3 + 2 = 5Print x = 9Print x = 9 i = 5 + 2 = 7 i = 5 + 2 = 7Print x =16Print x =16 i = 7 + 2 = 9 i = 7 + 2 = 9Print x =25Print x =25 i = 9 + 2 = 11 i = 9 + 2 = 11Print x =36Print x =36 i = 11+2 = 13 i = 11+2 = 13Print x =49Print x =49 i = 13+2 = 15 i = 13+2 = 15Print x =64Print x =64 i = 15+2 = 17 i = 15+2 = 17Print x =81Print x =81 i = 17+2 = 19 i = 17+2 = 19Print x =100Print x =100 i = 19+2 = 21 i = 19+2 = 21

Page 48: Presented by:- M. Bandula Peiris ISA - (ICT)_Kurunegala Education Zone

End