Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main() {
- double n, a, b, x, y;
- std::cin >> n >> a >> b >> x >> y;
- if (n <= a) {
- std::cout << n;
- }
- else if (n >= a && n < b ) {
- std::cout << n - (n * (x / 100));
- }
- else if (n==b) {
- std::cout << n - (n * (x / 100));
- }
- else
- std::cout << n - (n * (y / 100));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement