Jump to content


Check out our Community Blogs

Ritwik I the programmer

Member Since 01 Aug 2011
Offline Last Active May 30 2016 10:55 PM
*****

#670348 Nested For Loop [EXAMPLES!]

Posted by Ritwik I the programmer on 23 April 2014 - 07:04 AM

Not the exact one perhaps, but there are a lot of arrangement problems in the preceding pages. It is always better if try to work out a problem yourself with a few hints than if you are handed down the solution.

    As for your question, try doing it with two nested loops, one for the upper triangle including the middle line and another to print the bottom half of the diamond. For the upper triangle the number of spaces at the beginning of a line is equal to n - i, where i is the line number of thecurrent line and n the line number of the middle line.


  • 1


#662108 Religion

Posted by Ritwik I the programmer on 27 July 2013 - 07:15 AM

I'm a Hindu by birth, and no, we don't exactly worship cows (not explicitly anyway. They are regarded as the greatest measure of wealth and the holiest possible gift, along with being associated with several deities). The basic tenet of Hinduism is that there is one Supreme God, but He expresses himself through diverse physical manifestations, many of whom, like the Greek gods, are almost human in their chracteristics. I'm not very devout by any means, but the philosophical aspects of Hinduism, such as that of God being both infinite and emptiness at the same time, the idea of bliss, have shaped my thinking over the years.


  • 1


#652924 Maze Tutorial

Posted by Ritwik I the programmer on 21 February 2013 - 09:11 AM

charvie5, you could PM the author of the tutorial or start a separate thread on this topic. To get proper help, you will need to post your code as well.


  • 1


#649642 Pointers!

Posted by Ritwik I the programmer on 10 January 2013 - 04:39 AM

Compared to any minor (or non - existent) slips in a beginner level tutorial, incomprehensible syntactical jargon is far more likely to drive a beginner away, and cause lack of self confidence in his programming style. Anyway, Evan's straight answer solved my problem, so thanks to him.
  • 1


#646424 List of simple Java games

Posted by Ritwik I the programmer on 06 December 2012 - 05:05 AM

Here's an applet version of connect4 I made. Its quite basic(thanks to my limited capability).

Connect4 is a game in which a player can drop a ball of his color in one of the 10 columns, each 10 rows high. The aim of the game is to connect 4 balls of your color. Its basically quite similar to Tic-Tac-Toe, except you can't place the ball anywhere you please. It drops to the bottommost empty row.

Attached File  Connect4.rar   44.95KB   5566 downloads
  • 1


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download