Facebook
From Coral Macaque, 5 Years ago, written in C++.
Embed
Download Paste or View Raw
Hits: 201
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.         int power;
  9.         cout << "Wprowadz n\n";
  10.         cin >> power;
  11.  
  12.         float pattern = pow((5.0 / 6.0), power-1.0);
  13.         pattern *= (1.0 / 6.0);
  14.  
  15.         cout << pattern << endl;
  16.  
  17.         system("pause");
  18. }