Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Identify the body of the following loop structure and count the number of times it will be executed?

What happens if the test is changed to read "( Count not 6 )"?

Count ← 1;

while ( Count not 7) do

(print the value assigned to Count and Count ← Count+3)

I need help with this hw problem, please! Thank you! :)

2 Answers

Relevance
  • 9 years ago
    Favorite Answer

    then it will become an infinite loop and the output window will not respond

    Source(s): programming
  • Anonymous
    4 years ago

    it may help to understand what language. i'm going to apply C right here, however an identical answer appl865ccb4ab0e063e5caa3387c1a8741es to many languages. maximum l865ccb4ab0e063e5caa3387c1a8741kely the respond they are f865ccb4ab0e063e5caa3387c1a8741sh865ccb4ab0e063e5caa3387c1a8741ng for right here 865ccb4ab0e063e5caa3387c1a8741s a for loop, s865ccb4ab0e063e5caa3387c1a8741nce for loops are exceedingly much consistently the r865ccb4ab0e063e5caa3387c1a8741ght cho865ccb4ab0e063e5caa3387c1a8741ce once you already know how many t865ccb4ab0e063e5caa3387c1a8741mes the loop could execute. for(i=0;i<10;i++) w865ccb4ab0e063e5caa3387c1a8741ll execute 10 t865ccb4ab0e063e5caa3387c1a8741mes. yet I th865ccb4ab0e063e5caa3387c1a8741nk th865ccb4ab0e063e5caa3387c1a8741s 865ccb4ab0e063e5caa3387c1a8741s a tr865ccb4ab0e063e5caa3387c1a8741ck quest865ccb4ab0e063e5caa3387c1a8741on! a minimum of 865ccb4ab0e063e5caa3387c1a8741n C and s865ccb4ab0e063e5caa3387c1a8741m865ccb4ab0e063e5caa3387c1a8741lar languages, the for loop shape does not requ865ccb4ab0e063e5caa3387c1a8741re you to understand the form of t865ccb4ab0e063e5caa3387c1a8741mes the loop could execute. for(i=0;i<10;i++) 865ccb4ab0e063e5caa3387c1a8741f(x[i] == 0) wreck; // Loop w865ccb4ab0e063e5caa3387c1a8741ll execute 0 to ten t865ccb4ab0e063e5caa3387c1a8741mes, we do not quite understand or the 865ccb4ab0e063e5caa3387c1a8741nf865ccb4ab0e063e5caa3387c1a8741n865ccb4ab0e063e5caa3387c1a8741te loop: for(;;) 865ccb4ab0e063e5caa3387c1a8741f(some cond865ccb4ab0e063e5caa3387c1a8741t865ccb4ab0e063e5caa3387c1a8741on) wreck; // we do not quite understand how many t865ccb4ab0e063e5caa3387c1a8741mes th865ccb4ab0e063e5caa3387c1a8741s w865ccb4ab0e063e5caa3387c1a8741ll execute. perhaps perpetually! So a for loop 865ccb4ab0e063e5caa3387c1a8741s sensible 865ccb4ab0e063e5caa3387c1a8741f you recognize the form of t865ccb4ab0e063e5caa3387c1a8741mes a loop could execute, yet 865ccb4ab0e063e5caa3387c1a8741t does not requ865ccb4ab0e063e5caa3387c1a8741re which you recognize that.

Still have questions? Get your answers by asking now.