STANAANDREY

ceilXOnY

Feb 8th, 2021 (edited)
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. double ceilXOnY(double x, double y) {
  5.     return (x + y - 1) / y;
  6. }
  7.  
  8. int main() {
  9.     double x, y;
  10.     cin >> x >> y;
  11.     cout << ceilXOnY(x, y) << endl;
  12.     return 0;
  13. }
  14.  
Add Comment
Please, Sign In to add comment