Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- /*
- ++ inkrementacja
- -- dekrementacja
- += zwiększenie wartości o podaną wartość
- -= zmniejszenie wartości o podaną wartość
- *= pomnożenie przez daną wartość
- /= podzielenie przez daną wartość
- */
- int liczba = 5;
- cout << liczba << endl; // 5
- ++liczba;
- cout << liczba << endl; // 6
- --liczba;
- cout << liczba << endl; // 5
- liczba += 6;
- cout << liczba << endl; // 11
- liczba -= 10;
- cout << liczba << endl; // 1
- liczba *= 2;
- cout << liczba << endl; // 2
- liczba /= 2;
- cout << liczba << endl; // 1
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment