Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- int n, a=0, b=1, c;
- cout << "n = "; cin >> n;
- for(int i=1; i<=n; i++){
- c=a+b;
- a=b;
- b=c;
- double ratie=(double)b/(double)a;
- cout << "Ratie" << " " << i << ": " << ratie << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement