MeehoweCK

Untitled

Mar 23rd, 2020
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     /*
  8.     ++ inkrementacja
  9.     -- dekrementacja
  10.     += zwiększenie wartości o podaną wartość
  11.     -= zmniejszenie wartości o podaną wartość
  12.     *= pomnożenie przez daną wartość
  13.     /= podzielenie przez daną wartość
  14.     */
  15.  
  16.     int liczba = 5;
  17.     cout << liczba << endl;     // 5
  18.     ++liczba;
  19.     cout << liczba << endl;     // 6
  20.     --liczba;
  21.     cout << liczba << endl;     // 5
  22.     liczba += 6;
  23.     cout << liczba << endl;     // 11
  24.     liczba -= 10;
  25.     cout << liczba << endl;     // 1
  26.     liczba *= 2;
  27.     cout << liczba << endl;     // 2
  28.     liczba /= 2;
  29.     cout << liczba << endl;     // 1
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment