Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <cmath>
- #include <math.h>
- #include <iostream>
- using namespace std;
- void rek(double mas[]);
- int main() {
- double mas[256];
- mas[0]=1;
- mas[1]=0.5;
- rek(mas);
- return 0;
- }
- void rek(double mas[]){
- cout << "mas[0] - " << mas[0] << endl;
- cout << "mas[1] - " << mas[1] << endl;
- for(int i=2;i<10;i++){
- mas[i]=mas[i-1]*mas[i-2];
- cout << "mas["<< i << "] - " << mas[i] << endl;
- }
- cout << "Ряд сходится";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement