Question

Check whether the given loop is finite or infinite. If infinite, do the necessary changes in the written loop to make it finite.

x<-0
repeat{
print(x^2)
x<-x+1
if(x<5) print(x) }

08 Sep 2023
Answer :
Word Count : 235

The given loop is currently infinite because there is no explicit condition to stop the loop. In the absence of a termination condition, the loop will keep running indefinitely, and it will print the square of `x` and the value of `x` as long as `x` is less than 5, but it will never stop.

To

________ _____ ___ ________ _____ _____.
____ ____ _________ ____ ____ __________ _________ _____ ________.
____ ____ _________ _________ _______.
____ _______ ____ ____ __________ ____ __________ ___ _________ _________ _________.
_______ __________ ___ __________ __________ _________ ______ _____ _______.
____ _________ _______ ________ ____ ______.
________ _____ ______ _________ ________ ________ __________.
__________ _________ _____ ___ _____ ____ _________ _________ _______ _________.
___ ___ ______ _________ ________ ________ _________ _______ ___ ________.
______ _________ _____ ___ ____.
___ ________ __________ ____ ____ _______ ________ ________ ___ _______.
______ _________ _____ _____ _____ _____ ___ ___ __________ ________ ______.
________ ______ _____ _____ _________ _______ _______ ______ ____.
____ __________ ____ __________ ________ _____ ________ _________.
______ ________ _____ _____ ___ _______.
_________ ________ __________ _________ ___ ___ ________ _____.
____ ___ ________ _________ ________ _______.
__________ _____ ___ _______ _______ _______ ____ _______ _________.
_______ ________ _______ __________ _____ _______.
_______ ___ _________ _______ ___ __________ ___.
___ _____ ___ ________ ____ ______ _______ ________ ______ _________.
_________ ____ ______ __________ ___.
___ _____ ____ ________ ______.
__________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU MST 15 2023 - Check whether the given loop is finite or infinite. If infinite, do th | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→