Advertisement
Kentoo

E#1

Jan 16th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <iomanip>
  4. #include <cmath>
  5.  
  6. using namespace std;
  7.  
  8. void main()
  9. {
  10.     double N = 10, A = 0.55, B = 1.0;
  11.     double d = (B - A) / (N + 1), x = A;
  12.     double y;
  13.     cout << setw(10) << "x" << setw(10) << "y" << endl;
  14.     while (x <= B) {
  15.         y = sqrt(pow(x, 4.0 / 5) + pow(x, ((4.0 - x) / 5.0))) + log(abs(x - 20.5));
  16.         cout << setw(10) << x << setw(10) << y << endl;
  17.         x += d;
  18.     }
  19.     system("pause");
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement