Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n, a, r, b;
- cin >> n >> a >> r >> b;
- int podaroci_a = n / a;
- int ostatok_a = n % a;
- int vrateni_pari = podaroci_a * r;
- vrateni_pari += ostatok_a;
- int podaroci_b = vrateni_pari / b;
- if (podaroci_b > podaroci_a)
- {
- cout << "DA" << endl;
- }
- else {cout << "NE" << endl;}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement