fork download
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. double x;
  8. if (cin >> x) {
  9. long long a = floor(x);
  10. long long b = a + 1;
  11. cout << a << " " << b << "\n";
  12. }
  13. return 0;
  14. }
Success #stdin #stdout 0s 5328KB
stdin
Standard input is empty
stdout
Standard output is empty