owlachno

gg

Feb 4th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main ()
  5. {
  6.     double P, X, Y, S, M;
  7.     int R, K;
  8.     cin >> P >> X >> Y;
  9.     S = ((X * 100 + Y) * P)/100 + X * 100 + Y;
  10.     cout << S << " ";
  11.     S = S / 100;
  12.     cout << S << " ";
  13.     R = (int)S;
  14.     cout << R << " ";
  15.     K = (S - R) * 100;
  16.     cout << K << " ";
  17.     cout << R << " " << K;
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment