Advertisement
MeehoweCK

Untitled

Jan 4th, 2021
630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. double dzielenie(int a, int b)
  6. {
  7.     // uwaga: pamiętaj, że dzieląc przez siebie dwie liczby typu int, komputer poda tylko część całkowitą wyniku!
  8.     return 1.0 * a / b;
  9. }
  10.  
  11. int main()
  12. {
  13.     cout << dzielenie(7, 3) << endl;
  14.     cout << dzielenie(178, 231) << endl;
  15.     cout << dzielenie(18, 3) << endl;
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement