Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6.  
  7. cout << "FOR LOOP: " << endl;
  8. for (int i = 0; i < 5; i++) {
  9.  
  10. cout << "This is FOR LOOP" << endl;
  11.  
  12. }
  13.  
  14. cout << "\n";
  15.  
  16. cout << "WHILE LOOP: " << endl;
  17. int j = 0;
  18.  
  19. while (j < 5) {
  20.  
  21. cout << "This is WHILE LOOP" << endl;
  22. j++;
  23.  
  24. }
  25.  
  26. cout << "\n";
  27.  
  28. cout << "DO WHILE LOOP: " << endl;
  29. int k = 0;
  30.  
  31. do {
  32.  
  33. cout << "This is DO WHILE LOOP" << endl;
  34. k++;
  35.  
  36. } while (k < 5);
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement