Wednesday, September 9, 2009

25. Computer Programming with flowcharting Technique (page 25)

free counters



FIG.27

Sunday, September 6, 2009

24. Computer Programming with flowcharting Technique (page 24)

free counters



FIG.26
7.1.6. f. WHILE . . . WEND
1F1.
10 CLS
15 PRINT “PROG022”
20 X = 1
30 WHILE X < = 100
40 PRINT X;
50 X = X + 1
60 WEND
70 END

1F2.
10 CLS
15 PRINT “PROG023”
20 X = ( 1 – 1 )
30 WHILE X < 100
40 X = X + 1
50 PRINT X;
60 WEND
70 END

Note:
( PRINT X); backward and (PRINT X) ; in front )
If You change line number 40 and 50
40 X = X + 1
50 PRINT X;
change
40 PRINT X;
50 X = X + 1
Output:
2 3 4 . . . . 100 101 0 1 2 3 4 . . . . 100

23. Computer Programming with flowcharting Technique (page 23)

free counters



FIG.25
7.1.5. e. DO [statement block] . . . LOOP [ (UNTIL) condition ]
1E1.
10 CLS
15 PRINT “PROG020”
20 X = 1
30 DO
40 PRINT X;
50 X = X + 1
60 LOOP UNTIL X > 100
70 END

1E2.
10 CLS
15 PRINT “PROG021”
20 X = ( 1 – 1 )
30 DO
40 X = X + 1
50 PRINT X;
60 LOOP UNTIL X = 100
70 END

22. Computer Programming with flowcharting Technique (page 22)

free counters



FIG.24
7.1.4. d. DO [statement block] . . . LOOP [ (WHILE) condition ]
1D1
10 CLS
15 PRINT “PROG017”
20 X = 1
30 DO
40 PRINT X;
50 X = X + 1
60 LOOP WHILE X < = 100
70 END

1D2.
10 CLS
15 PRINT “PROG018”
20 X = ( 1 – 1 )
30 DO
40 X = X + 1
50 PRINT X;
60 LOOP WHILE X < 100
70 END

21. Computer Programming with flowcharting Technique (page 21)

free counters



FIG.23
7.1.3. c. DO [ (UNTIL) condition ] [statement block] . . . LOOP
1C.1.3
10 CLS
15 PRINT “PROG016”
20 X = 1
30 DO UNTIL X > 100
40 PRINT X;
50 X = X + 1
60 LOOP
70 END

1C.2.
10 CLS
15 PRINT “PROG017”
20 X = ( 1 – 1 )
30 DO UNTIL X = 100
40 X = X + 1
50 PRINT X;
60 LOOP
70 END

20. Computer Programming with flowcharting Technique (page 20)

free counters



FIG.22

19. Computer Programming with flowcharting Technique (page 19)

free counters



FIG.21
Writing differs from command goto but the output is same

7.1.1. a. FOR - - - NEXT - - - STEP
10 CLS
15 PRINT “PROG013”
20 X = 1
30 FOR X = 1 TO 100 STEP 1
35 PRINT X;
40 NEXT X
50 END

Followers

Blog Archive