what is the actual assignment, find the A and B positions and putting *'s? If so first of all find exact location of 'A' and 'B', then put the star's.
ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
posted 8 years ago
The assignment is to place A and B randomly, and connect it with *. So, whenever the program is run, the position of A and B is change and linked with *.
riris wijaya wrote:
but still, i can conect A and B with *. Is there any suggestion???
Same suggestion you've already received:
Campbell Ritchie wrote:Pencil and paper. That’s what you need. Write down an explanation of how you would do that. Once you have got it into very simple words (pseudo-code), it will be easy to convert to code.
My suggestion is to scrap what you have done, turn off the computer, and follow Campbell's suggestion of solving the problem with pencil and paper. If you really do this, then writing the code will be simple. Well, okay I have a second suggestion: use the power of objects!