Advertisement
kitch190

c++ basic while loop with sentinel

Nov 10th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. int n = 10;
  6. while (n != 0)
  7. {
  8. std::cout << "Loop is still going!" << std::endl;
  9. n--;
  10.  
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement