Is it possible to write a for loop that does not execute when the program runs? A while loop? A do while loop?

What will be an ideal response?


Yes, it is possible to write a for or while loop that never executes based on the conditional statement. It is not possible to write a do while loop that does not execute at all, as do while loops always execute at least once.

Computer Science & Information Technology

You might also like to view...

What is the logical address?

What will be an ideal response?

Computer Science & Information Technology

(Computer-Assisted Instruction: Monitoring Student Performance) More sophisticated computer-assisted instruction systems monitor the student’s performance over a period of time. The decision to begin a new topic is often based on the student’s success with previous topics. Modify the program of Exercise 5.57 to count the number of correct and incorrect responses typed by the student. After the student types 10 answers, your program should calculate the percentage that are correct. If the percentage is lower than 75%, display "Please ask your teacher for extra help.", then reset the program so another student can try it. If the percentage is 75% or higher, display "Congratulations, you are ready to go to the next level!", then reset the program so another student can try it.

What will be an ideal response?

Computer Science & Information Technology

How does software team choose the task set for a particular project?

What will be an ideal response?

Computer Science & Information Technology

How does Cisco describe Ethernet NICs in its device software?

What will be an ideal response?

Computer Science & Information Technology