diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..65d0e7e --- /dev/null +++ b/main.cpp @@ -0,0 +1,29 @@ +#include +using namespace std; + +int main() { + int i,n; + float suma; + int f[100], f0, f1; + float zl; + + + cout << "N = "; + cin >> n; + f0 = 0; + f1 = 1; + cout << f0 << " " << f1 << " "; + for(i = 2;i<=n;i++) { + suma = f0 + f1; + cout << suma << " "; + f0 = f1; + f1 = suma; + } + + zl = suma/f0; + + cout << "\nZlota liczba = " << zl << endl; + + system("pause"); + return 0; +} \ No newline at end of file