Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- /* operatory arytmetyczne
- + dodawanie
- - odejmowanie
- * mnożenie
- / dzielenie
- % reszta z dzielenia (modulo)
- */
- int main()
- {
- int liczba = 10;
- int druga_liczba = 17;
- cout << liczba / druga_liczba << endl; // UWAGA! dzielenie dwóch liczb całkowitych zawsze daje wynik całkowity!
- cout << 1.0 * liczba / druga_liczba << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement