daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest Nov 13th, 2018 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3. double oblicz (double A[],int n,double x)
  4. {
  5.     if(n==0)return A[0];
  6.     if(n>0)return oblicz (A,n-1,x)*x+A[n];
  7. }
  8. main()
  9. {
  10.     double x;
  11.     cout<<"Podaj system: ";
  12.     cin>>x;
  13.     int n;
  14.     cout<<"Podaj ilość elementów tablicy: ";
  15.     cin>>n;
  16.     double A[n];
  17.     for(int i=0;i<n;i++){cout<<"Podaj wartosc tablicy: "; cin>>A[i];}
  18.     if(x>=2 && x<=9)
  19.     {
  20.     cout<<oblicz(A,n-1,x);
  21. }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top