मराठी

Does testing the loop condition affect the loop invariant? Why?

Advertisements

प्रश्न

Does testing the loop condition affect the loop invariant? Why?

टीपा लिहा
Advertisements

उत्तर

No, the loop condition does not affect the loop invariant. Because the loop invariant is true at four points.

  1. At the start of the loop.
  2. At the start of each iteration.
  3. At the end of each iteration.
  4. At the end of the loop.
shaalaa.com
Loop Invariant
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 8: Iteration and recursion - Evaluation - Section - B [पृष्ठ ११३]
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×