kumar nandha wrote:
Please give me the program for following ouput
We don't do that. Nobody here should give you the code. We will HELP you do it, but YOU have to do it.
All programming tasks start the same way. First, walk away from your computer. Then, get some paper and pencils, and a large eraser, and start writing out in English (or any other natural language you prefer) how YOU would do it. No
java terms. No computer terms. Just words. Pretend you are trying to tell a child what needs to be done, remembering they are VERY literal.
You can start off with broad steps, but then refine them until they are more and more specific.
After you've refined them 3-4 times, then
you should start seeing what needs to be done in any specific language, and you work from there.