Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.11 seconds.

  1. Re: Using a while or do loop to represent the Rice and Chessboard case

    Either way, I think you're trying to do too much inside the loop statement. Think about how you might use other variables instead of trying to do everything with a single variable i.
  2. Re: Using a while or do loop to represent the Rice and Chessboard case

    If i is equal to the grains of rice, and you're multiplying the grains of rice by 2 each time, what is the significance of adding 1 to i each time?
  3. Re: Using a while or do loop to represent the Rice and Chessboard case

    Well, the only number you're incrementing is i. What does that represent? In the stuff you wrote out, where is the equivalent of i?
  4. Re: Using a while or do loop to represent the Rice and Chessboard case

    You should post your code in the form of an SSCCE so we can see what's really going on. Don't forget the highlight tags.

    But you're going to have to think about how you solved it in the first...
Results 1 to 4 of 4