Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- using namespace std;
- int main()
- {
- double x=-.5;
- double sum1=0;
- double sum2=0;
- double mn1=0;
- double mn2=0;
- mn1=(1+x)/(1-x);
- cout<<mn1<<endl;
- cout<<endl;
- sum1=log(mn1);
- for (int k=1;k<=100;k++){
- mn2=k*2-1;
- //cout<<mn<<",";
- sum2+=pow(x,mn2)/mn2;
- }
- cout<<endl;
- cout<<sum1<<endl;
- cout<<sum2*2<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement