Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main ()
  6.  
  7. {
  8. double x;
  9. cout.setf(ios::scientific);
  10. cout.precision(4);
  11.  
  12. cout << "Podaj x: " << endl;
  13. cin>>x;
  14.  
  15. if ( (x<-9.5) || (x>-1) and (x<1) || (x>4))
  16. {
  17. cout<<"f(x) nieokreslona." <<endl;
  18. }
  19. else
  20. {
  21. cout << "Funkcja f(x) dla wartości "<<x<<" przyjmuje wartosc: ";
  22. cout << (log(4-x)+sqrt(pow(x,2)-1)+pow(x+9.5, 0.25))<<endl;
  23. }
  24.  
  25. system("PAUSE");
  26. return 0;
  27.  
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement