Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- double y(double x){
- return (1/(x+7.0))+ log(1-abs(x));
- }
- int main()
- {
- double x,h;
- double b;
- cout<<"vvedite a ";
- cin>>x;
- cout<<"vvedite b ";
- cin>>b;
- cout<<"vvedite shag ";
- cin>>h;
- while(x<=b){
- if(x==-7||abs(x)>=1){
- cout<<"pri x="<<x<<" "<<"func ne opredelena"<<endl;
- x+=h;
- }
- else{
- cout<<"x="<<x<<" "<<"y="<<y(x)<<" "<<endl;
- x+=h;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement