Solved

Multiplication Table in Raptor

Posted on 2011-09-24
Medium Priority
2,253 Views
Can someone guide me through this please.  This has to be done in Raptor.

1. Provide your analysis for the following problem statement: You need to write a program that would calculate the results for the multiplication table up from 1 to 100. (For example, 1X1, 1X2, 1X3 … 1X10, 2X1, 2X2 …. 10X2 … 10x10). Your program should print the output for each step and output a new line after 10 items. So the example output would be something like this Notice a new line appears after 10 steps:
1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 … 20

10 20 30 … 100

To write the new lines you can just use code similar to : write “new line”. Hint: You will probably use a nested repetition loop.
0
Question by:bcg_81

LVL 43

Accepted Solution

pcelba earned 1000 total points
ID: 36592563
You cannot suppose we'll solve your home work for you. This would really be very bad approach how to learn something...

In addition to this you are asking in dBase forum which has nothing related to Raptor. You should ask in Miscellaneous programming or in Algorithm etc.

OTOH, the dBase (or FoxPro or Clipper) code for your task is very simple:

``````FOR lnI = 1 TO 10
?
FOR lnJ = 1 TO 10
?? lnI * lnJ
NEXT
NEXT
``````
Older dBase versions do not know FOR - NEXT loop and you have to use DO WHILE loop:
``````lnI = 1
DO WHILE lnI <= 10
lnJ = 1
?
DO WHILE lnJ <= 10
?? lnI * lnJ
lnJ = lnJ + 1
ENDDO
lnI = lnI + 1
ENDDO
``````

Raptor solution should probably be of same complexity (means very easy) and it your responsibility to read Raptor manuals and write such trivial code.
0

Author Closing Comment

ID: 36938308
Thanks.
0

Featured Post

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.