Advertisement
Josif_tepe

Untitled

May 21st, 2021
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n, a, r, b;
  8.     cin >> n >> a >> r >> b;
  9.     int podaroci_a = n / a;
  10.     int ostatok_a = n % a;
  11.     int vrateni_pari = podaroci_a * r;
  12.     vrateni_pari += ostatok_a;
  13.     int podaroci_b = vrateni_pari / b;
  14.     if (podaroci_b > podaroci_a)
  15.     {
  16.         cout << "DA" << endl;
  17.     }
  18.     else {cout << "NE" << endl;}
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement