Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Zadanie_3_XIII.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <iostream>
- #include <clocale>
- #include <math.h>
- using namespace std;
- int _tmain(int argc, _TCHAR* argv[])
- {
- setlocale(LC_CTYPE, "rus");
- double a,y;
- cout<<"Введите а:\n";
- cin>>a;
- if(a<-2)
- y=(-5.0/3)*a-10.0/3;
- else
- if((a==-2)||(a==2))
- y=0;
- else
- if((a>-2)&&(a<2))
- y=pow(4-a*a,1.0/2);
- else
- if(a>2)
- y=(5.0/3)*a-10.0/3;
- else
- cout<<"debug";
- cout<<"y:\n";
- cout<<y; cout<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment