Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main() {
- cout << "FOR LOOP: " << endl;
- for (int i = 0; i < 5; i++) {
- cout << "This is FOR LOOP" << endl;
- }
- cout << "\n";
- cout << "WHILE LOOP: " << endl;
- int j = 0;
- while (j < 5) {
- cout << "This is WHILE LOOP" << endl;
- j++;
- }
- cout << "\n";
- cout << "DO WHILE LOOP: " << endl;
- int k = 0;
- do {
- cout << "This is DO WHILE LOOP" << endl;
- k++;
- } while (k < 5);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement