how to develop logic in programming languages like java,c,c++
What do you mean by 'develop logic'?
where should we use different loops n conditions, how many times a loop will run etc
That totally depends on the problem. and also your approach.
Start developing small programs such as solving small mathematical equations. For understanding the true usage of loops, you should start with only one for example 'for loop' and then try to convert them to others. Always remember, programming comes with practice.
@gagan so basically want to 'LEARN' programming, try java for dummies
You should develop the logic first , write it down in steps in english or mathematics depending on the situation. Then you should know enough of the language to be able to translate. Logic comes through practice, deep thinking and folloowing examples.
logic is sadly not given to anyone!