Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<math.h>
- using namespace std;
- double F(int x) {
- double result = x * (sqrt(x + 1) - sqrt(x));
- return result;
- }
- double F2(int x) {
- double result = x / (sqrt(x + 1) + sqrt(x));
- return result;
- }
- int main()
- {
- // cout << F(100) << endl;
- // cout << F2(100);
- int x = 100;
- double f = F(x);
- // double galat = x - f;
- double f2 = F2(x);
- // double galat2 = x - f2;
- printf("%.20f\n%.20f", f, f2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement