fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <numeric>
  6. #include <string>
  7. #include <vector>
  8. #include <deque>
  9. #include <queue>
  10. #define ll long long
  11. const int N = 10e5 + 5 ;
  12. const double pi = 3.14;
  13. using namespace std;
  14. int main()
  15. {
  16. float x , m ;
  17. int y;
  18. cin >> x ;
  19. y = x ;
  20. if(y == x )
  21. cout << "int" << " " << y << '\n';
  22. else{
  23. m = x - y;
  24. cout << "float" <<" " << y << " " << fixed << setprecision(3) << m << '\n';}
  25. return 0;
  26.  
  27.  
  28. }
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
Success #stdin #stdout 0.01s 5472KB
stdin
534.958



stdout
float 534 0.958