artemgf

А олени лучше!

May 1st, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <string>
  4. #include <math.h>
  5. #include <algorithm>
  6. #include <vector>
  7. #include <set>
  8. #include <map>
  9. #include <sstream>
  10. #include <queue>
  11. #include <stdint.h>
  12.  
  13. using namespace std;
  14.  
  15. int main()
  16. {
  17.     double t;
  18.     int l, h;
  19.  
  20.     cout.setf(ios::fixed);
  21.     cout.precision(5);
  22.  
  23.     cin >> l >> h >> t;
  24.  
  25.     if(l%h==0)
  26.     cout << l / h*t << " " << + (l / h)*t;
  27.     else
  28.         cout << l / h*t << " " << +(l / h)*t+t;
  29.  
  30.     _getch();
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment