• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Loops??

 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


please help me with the process...iam getting 8,5...


here what happens when break and continue of if statement is executed??
[ October 20, 2005: Message edited by: srikanth reddy ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By adding some System.out.printlns and making it prettier.



Hope that helps.

I' never can understand why comd eCODE tags has the text small and some larger.

Mark
[ October 20, 2005: Message edited by: Mark Spritzler ]
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Running in a different low priority thread to Mark (on paper ) I reckon you just forgot that after the last comparison i++ < j-- jumped out of the loop, i and j had been incremented respectively decremented. That is 8,5 gets you out of the loop but then i is 9 and j is 4. Makes you dizzy eh?

Actually I had problems doing one like this on the real exam - at the same time there were three people trying to get the PC next to me working.
 
srikanth reddy
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
barry i didnt get u ....try to get pc means...
also barry if these sort of questions comes on exam in 1 means fine ..but if they are many i shall go mad ..also yesterday i was doing these dan questions ..i was right almost all..but my head was roaming here and there ...u got it what i mean ???
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can we bring pencil and scratch paper to the test? I can do these problems quicker if I can write down what happens in the iterations.
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The testing center will provide pencil & paper. Not allowed to bring your own. I had to also check my jacket. Nothing else allowed in (bags, cell phones, etc).
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic