Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. ofstream out("Tabel.txt");
  8.  
  9. int main()
  10. {
  11. double x, y;
  12. double PI = atan(1) * 4;
  13.  
  14. for(x = -3; x <= 8; x += 1){
  15. if(x < 0){
  16. y = (sqrt(pow(x, 2) + 1) - x) / (pow(x, 3) - 1);
  17. }else if(x < PI){
  18. y = 5 * pow (cos(x), 7) - 1 + (3 + sin(2 * x)) / (1 + pow(sin(x), 2));
  19. }else{
  20. y = cbrt((pow(x, 2) + sqrt(pow(x, 5) - 1)) / (2 * x + 3));
  21. }
  22. out <<"f(" << x << ") = " << y << endl;
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement