MeehoweCK

Untitled

Apr 4th, 2023
708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. /*
  6. Pętla do while - składnia:
  7.  
  8. do
  9.     komenda_do_wykonania;
  10. while(warunek_kontynuacji);
  11.  
  12. */
  13.  
  14. int main()
  15. {
  16.     // program wypisujący na ekran liczby od 1 do 10 za pomocą pętli do while
  17.     int i = 1;
  18.     do
  19.     {
  20.         cout << i << endl;
  21.         ++i;
  22.     } while(i <= 10);
  23.  
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment