Saturday, May 16, 2009

Funny programs

Before six months ago one of my friends came to ask some basic things in java from me. I taught him some basic things on functions and loops and I showed him how to print a triangle from stars like this.



Then I asked him that can you write a code which gives an output like this, and I went to bring a cup of tea.


When I came back he showed me the code which wrote from bottom to top.  


No comments:

Post a Comment