fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int x,y,i=1000;
  8. cin >> x;
  9. cin >> y;
  10. cout << x/y << ".";
  11. while (i-- && (x%y))
  12. {
  13. x=(x%y)*10;
  14. cout << x/y;
  15. }
  16. return 0;
  17. }
Success #stdin #stdout 0.02s 2728KB
stdin
Standard input is empty
stdout
-9.0-4-4-3-7-8-6-5-6-8-5-3-2-5-80-5-4-7-3-6-8-90-5-60-1-40-8-1-5-50-8-7-6-1-1-2-60-7-7-1-30-1-8-5-4-9-8-1-2-4-8-9-30-7-3-9-7-70-5-1-2-4-1-7-2-6-8-4-4-6-4-9-10-90-20-6-1-8-8-4-9-8-5-100-7-7-6-5-8-4-8-4-5-2-1-7-9-5-3-7-900-2-6-9-6-4-2-5-90-5-8-9-4-6-6-2-2-8-6-3-8-7-9-8-3-5-7-9-10-6-7-90-60-2-8-3-4-2-8-1-4-4-1-40-2-5-9-9-1-1-6-1-1-6-1-2-4-3-5-3-9-3-5-9-9-1-6-4-8-9-1-4-5-2-1-4-7-2-2-1-7-3-6-5-8-7-6-7-1-3-7-6-8-6-4-6-10-8-6-3-5-4-3-4-2-6-5-3-4-3-5-3-7-2-1-2-1-9-6-2-9-4-1-3-2-2-2-10-1-4-9-9-3-8-30-1-5-5-20-9-2-4-8-4-9-7-9-8-4-1-8-7-2-9-2-9-7-6-6-6-7-2-6-1-4-7-1-4-1-8-4-9-4-2-5-2-7-7-4-3-5-60-3-3-5-3-1-4-6-5-5-3-9-3-6-1-1-20-8-1-8-2-2-6-5-30-4-1-9-5-7-9-5-5-3-9-9-8-1-3-50-2-9-5-10-4-1-1-4-5-8-3-6-1-5-5-9-7-9-6-1-7-6-6-6-9-9-9-1-2-8-400-2-80-9-8-3-3-5-6-10-5-1-8-90-4-5-8-7-7-6-4-5-1-1-6-4-6-8-9-9-2-7-7-4-7-6-1-4-90-9-8-8-8-4-1-8-2-4-1-5-4-4-3-8-8-7-9-3-2-8-9-6-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