fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int amount_of_elements; double biggest_difference;
  7. cin >> amount_of_elements;
  8. biggest_difference = 1 - 1.0/amount_of_elements;
  9. cout << biggest_difference;
  10. }
Success #stdin #stdout 0s 3472KB
stdin
8
stdout
0.875