Thursday, October 1, 2009

32. Computer Programming with flowcharting Technique (page 32)

free counters


31. Computer Programming with flowcharting Technique (page 31)

free counters


30. Computer Programming with flowcharting Technique (page 30)

free counters



FIG.33

29. Computer Programming with flowcharting Technique (page 29)

free counters



28. Computer Programming with flowcharting Technique (page 28)

free counters


7.3. Looping in the loop
Problem example
Print number 2 to 10 step 3, every number printed followed by article * counted number is printed by that. The process is repeated 4 times
Output :
2 * * 5 * * * * * 8 * * * * * * * *
2 * * 5 * * * * * 8 * * * * * * * *
2 * * 5 * * * * * 8 * * * * * * * *
2 * * 5 * * * * * 8 * * * * * * * *


Program Listing
10 CLS
15 PRINT “PROG038”
20 A$ = “*” : K = 0 : B = 0 : C = 0
30 C = C + 1
40 IF C > 4 THEN 160
50 K = - 1
60 K = K + 3
70 IF K > 10 THEN 140
80 PRINT K ;
90 B = 0
100 B = B + 1
110 IF B > K THEN 60
120 PRINT A$;
130 GOTO 100
140 PRINT
150 GOTO 30
160 END

Description:
Statement PRINT at line 70 is that line move display.

27. Computer Programming with flowcharting Technique (page 27)

free counters





26. Computer Programming with flowcharting Technique (page 26)

free counters



FIG.28

Followers

Blog Archive