Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Vardas Pavardë*/
- #include <iostream>
- #include <math.h>
- #include <cmath>
- using namespace std;
- int main()
- {
- bool t = 1;
- int n = 1;
- float a, b, e = 0.00001;
- while(t)
- {
- a = (n+1)/((sqrt(pow(n+1,2)+1))*(sqrt(pow(n+1,2)-1)));
- int g = n+1;
- b = (g+1)/((sqrt(pow(g+1,2)+1))*(sqrt(pow(g+1,2)-1)));
- if(e>abs(b-a)){ cout << b; break;}
- n++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement