Advertisement
MeehoweCK

Untitled

Jun 28th, 2021
742
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. /* operatory arytmetyczne
  6. + dodawanie
  7. - odejmowanie
  8. * mnożenie
  9. / dzielenie
  10. % reszta z dzielenia (modulo)
  11. */
  12.  
  13. int main()
  14. {
  15.     int liczba = 10;
  16.     int druga_liczba = 17;
  17.     cout << liczba / druga_liczba << endl;  // UWAGA! dzielenie dwóch liczb całkowitych zawsze daje wynik całkowity!
  18.     cout << 1.0 * liczba / druga_liczba << endl;
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement