Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include "iostream"
- #include "iomanip"
- #include "math.h"
- using namespace std;
- int _tmain(int argc, _TCHAR* argv[])
- {
- double x,y;
- cout<<"Enter x="; cin>>x;
- if ( (x > 0) && (x <= 3) )
- {
- y=x+1;
- cout<<"y="<<y<<endl;
- }
- else if ( (x < 0) && (x >= -3) )
- {
- y=(-2*x/3);
- cout<<"y="<<y<<endl;
- }
- else cout<<"Ne prinadlezhit\n"<<endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment