Question
Write a C++ program to demonstrate break and continue statement.
Answer :
Word Count : 509
____ _________ _____ ____ ____ __________ _________.
___ ______ ________ ______ ____ _________ _____ ________ _________ _______.
_________ __________ __________ _____ _____ ________ __________ _____ _________.
_________ _________ _________ ________ ____ ___ ___ _______ ________.
_______ ___ ______ _______ ________ ______ ________ ____ ______ ______.
_______ ________ ________ ______ ________.
_______ ___ __________ _______ _______.
_________ ____ ______ ____ _______ ___ ______ _______ ____.
_______ __________ _______ __________ ______ _________ ______.
________ __________ ______ ___ __________ _________ ________ ____ ___ _______ ___ ___.
_____ ______ ___ ______ ______ ________ ____ ________ ______ _____ ___ ___.
___ _______ ____ ___ ________ ___ __________ ________ _______ _____.
_____ ___ ________ _________ ____ _______ __________.
_______ _______ ________ ______ ___ ______ ___ ____ ________ ___ _________ ______.
______ ______ ____ ________ ________.
____ ______ _______ _________ ______ ____ _____ ___.
_____ ________ _________ ___ _____.
_______ ___ _____ __________ ___ _________ _______ ___ _______.
______ ______ __________ ___ _________ ____ __________ _____ ______ ______ ______ _____.
_____ ______ __________ _________ _____ __________.
____ __________ _____ ____ __________ _________.
_________ _______ _____ ________ ___.
_______ _______ ___ _________ __________ ___ ________ ___ _________ _____ ______.
_________ __________ _________ ______ ____ ___ _______ ___.
_______ ______ __________ ______ ____ _____ _______ __________ ____ _____ __________ ___.
__________ _________ _________ ____ _____ ______ ____ _____ _________ ___.
____ ___ __________ _______ ____ ___ ____ __________ ____ _______.
__________ _____ ________ __________ ______ _________ ____ ________ _____.
___ ________ _______ _____ _____ __________ _________.
___ ____ _________ ____ ________.
_________ _____ ______ ______ _________.
_________ _____ ____ ________ _________ __________ ___ __________ ______.
__________ _______ _______ ____ _______ ________.
________ ___ ______ _____ _______ _____ ________ __________.
________ ______ ___ ___ ________ _________ _______ ________ __________.
__________ _____ ______ _________ ___ ______ _________ _____ _________ ____ ________ ____.
__________ _______ _________ ______ ________.
__________ _______ ___ _________ ________ ______ ______ ______ ________ _______ ________.
________ _________ _____ _________ ________ _______ _______ __________ __________ ______ ________ ________.
___ _______ ___ ________ _______.
______ ________ _____ _____ _____ _________ ___ ______ ________ ________ ________.
_____ ______ ____ ____ _______ ____ ______ _____ ________ ______.
_______ ___ ____ _____ _______ _________ _______ _______ _____ __________.
_________ _________ ____ _______ ______ ________ ______.
_____ _______ _____ _____ __________ ___.
__________ __________ _____ _____ ____ _______.
____ ________ _________ __________ _______ __________ __________ _______.
Skip in 10
#include <iostream> using namespace std; int main() { // Demonstration of the break statement cout << "Demonstrating the break statement:" << endl; for (int i = 1; i <= 10; i++) { if (i == 6) { cout << "Break triggered at i = " << i << endl; break; // Exit the loop when i equals 6 } cout << "i = " << i << endl; } // Demonstration of the continue statement cout << "\nDemonstrating the continue statement:" << endl; for (int i = 1; i <= 10; i++) { if (i == 6) { cout << "Continue triggered at i = " << i << endl; continue; // Skip the current iteration ___ ______ ________ ______ ____ _________ _____ ________ _________ _______.
_________ __________ __________ _____ _____ ________ __________ _____ _________.
_________ _________ _________ ________ ____ ___ ___ _______ ________.
_______ ___ ______ _______ ________ ______ ________ ____ ______ ______.
_______ ________ ________ ______ ________.
_______ ___ __________ _______ _______.
_________ ____ ______ ____ _______ ___ ______ _______ ____.
_______ __________ _______ __________ ______ _________ ______.
________ __________ ______ ___ __________ _________ ________ ____ ___ _______ ___ ___.
_____ ______ ___ ______ ______ ________ ____ ________ ______ _____ ___ ___.
___ _______ ____ ___ ________ ___ __________ ________ _______ _____.
_____ ___ ________ _________ ____ _______ __________.
_______ _______ ________ ______ ___ ______ ___ ____ ________ ___ _________ ______.
______ ______ ____ ________ ________.
____ ______ _______ _________ ______ ____ _____ ___.
_____ ________ _________ ___ _____.
_______ ___ _____ __________ ___ _________ _______ ___ _______.
______ ______ __________ ___ _________ ____ __________ _____ ______ ______ ______ _____.
_____ ______ __________ _________ _____ __________.
____ __________ _____ ____ __________ _________.
_________ _______ _____ ________ ___.
_______ _______ ___ _________ __________ ___ ________ ___ _________ _____ ______.
_________ __________ _________ ______ ____ ___ _______ ___.
_______ ______ __________ ______ ____ _____ _______ __________ ____ _____ __________ ___.
__________ _________ _________ ____ _____ ______ ____ _____ _________ ___.
____ ___ __________ _______ ____ ___ ____ __________ ____ _______.
__________ _____ ________ __________ ______ _________ ____ ________ _____.
___ ________ _______ _____ _____ __________ _________.
___ ____ _________ ____ ________.
_________ _____ ______ ______ _________.
_________ _____ ____ ________ _________ __________ ___ __________ ______.
__________ _______ _______ ____ _______ ________.
________ ___ ______ _____ _______ _____ ________ __________.
________ ______ ___ ___ ________ _________ _______ ________ __________.
__________ _____ ______ _________ ___ ______ _________ _____ _________ ____ ________ ____.
__________ _______ _________ ______ ________.
__________ _______ ___ _________ ________ ______ ______ ______ ________ _______ ________.
________ _________ _____ _________ ________ _______ _______ __________ __________ ______ ________ ________.
___ _______ ___ ________ _______.
______ ________ _____ _____ _____ _________ ___ ______ ________ ________ ________.
_____ ______ ____ ____ _______ ____ ______ _____ ________ ______.
_______ ___ ____ _____ _______ _________ _______ _______ _____ __________.
_________ _________ ____ _______ ______ ________ ______.
_____ _______ _____ _____ __________ ___.
__________ __________ _____ _____ ____ _______.
____ ________ _________ __________ _______ __________ __________ _______.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.