MeehoweCK

Untitled

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