Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main ()
- {
- double P, X, Y, S, M;
- int R, K;
- cin >> P >> X >> Y;
- S = ((X * 100 + Y) * P)/100 + X * 100 + Y;
- cout << S << " ";
- S = S / 100;
- cout << S << " ";
- R = (int)S;
- cout << R << " ";
- K = (S - R) * 100;
- cout << K << " ";
- cout << R << " " << K;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment