Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

kanigayan Group Title

The following for-loop is an infinite loop. for (int j = 0; j < 1000; i++ ) is this true or false

  • one year ago
  • one year ago

  • This Question is Closed
  1. Shadowys Group Title
    Best Response
    You've already chosen the best response.
    Medals 5

    well, yes, unless that i there is a typo.

    • one year ago
  2. kanigayan Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    it's false no because this loop will print 999 times , not infinite time no

    • one year ago
  3. Shadowys Group Title
    Best Response
    You've already chosen the best response.
    Medals 5

    but it's i that increases, not j, right?

    • one year ago
  4. kanigayan Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    umm not increase no cause it given limit no, when it is infinite j>1000 and j=1000

    • one year ago
  5. Shadowys Group Title
    Best Response
    You've already chosen the best response.
    Medals 5

    oh...so that i is a typo then. for (int j = 0; j < 1000; i++ ) <--infinite for (int j = 0; j < 1000; j++ ) <--not infinite

    • one year ago
  6. kanigayan Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    okay then The following for-loop is an infinite loop. for (int j = 0; j < 1000; i++ ) false no

    • one year ago
  7. kanigayan Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    beacuse it is not infinite loop no

    • one year ago
  8. Shadowys Group Title
    Best Response
    You've already chosen the best response.
    Medals 5

    (int j = 0; j < 1000; j++ ) is not an infinite loop. yup. look closely though... ^ <--this part here

    • one year ago
  9. kanigayan Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    okay thanx :)

    • one year ago
  10. Shadowys Group Title
    Best Response
    You've already chosen the best response.
    Medals 5

    you're welcome :) though you could just try to write a program and see if it works lol :P

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.