Well Come to Professional Programmers

Learning Goal

Learning is a process to acquire, enhance, or make changes in one's knowledge. Learning Module presents essential and masks non-essential pieces of knowledge. It is self paced and presents required links to important examples and related terminologies essentially required for examination centric study. The module is focused on examination system in vogue in Pakistan and helps student acquire maximum marks in limited time of study.

Monday, April 12, 2010



Practical#2



SOURCE PROGRAM



10 REM CALCULATE SQUARE AND CUBE OF FIRST TEN NATURAL NUMBERS

20 CLS

30 PRINT TAB(5) "NUMBERS", "SQUARES", "CUBE"

40 FOR N = 1 TO 10

50 LET S = N^2

60 LET C = N^3

70 PRINT TAB(5) N, S, C

80 NEXT N

90 END



OUTPUT



NUMBERS SQUARES CUBE
1 1 1
2 4 8
3 9 27
4 16 64
5 25 125
6 36 216
7 49 343
8 64 512
9 81 729
10 100 1000




Return to Top

No comments:

Post a Comment