• Post Reply Bookmark Topic Watch Topic
  • New Topic

Basic loop doubt  RSS feed

 
Karthikeyan Pandian
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I am getting the output as First loop completed
after that control is getting transferred to next while loop ..
I want to know the error in this code....
 
Tyson Lindner
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
J is always greater than 2 so you have an infinite loop

weeeeeeeeeeeee

add a j-- in your while loop if that's not what you want
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!