Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- double oblicz (double A[],int n,double x)
- {
- if(n==0)return A[0];
- if(n>0)return oblicz (A,n-1,x)*x+A[n];
- }
- main()
- {
- double x;
- cout<<"Podaj system: ";
- cin>>x;
- int n;
- cout<<"Podaj ilość elementów tablicy: ";
- cin>>n;
- double A[n];
- for(int i=0;i<n;i++){cout<<"Podaj wartosc tablicy: "; cin>>A[i];}
- if(x>=2 && x<=9)
- {
- cout<<oblicz(A,n-1,x);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement