Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdio.h"
- #include <iostream>
- using namespace std;
- int main()
- {
- int x, y;
- cin >> x;
- cin >> y;
- int a, b, c;
- bool bError = false;
- // - a
- if(x != 0)
- {
- a = tan((y-x)/x);
- if(a > 0)
- {
- a = sqrt(a);
- }
- else
- {
- bError = true;
- }
- }
- else
- {
- bError = true;
- }
- // - b
- if(x != 0)
- {
- b = y*y/x;
- if(b > 0)
- {
- b = ln(b);
- }
- else
- {
- bError = true;
- }
- }
- else
- {
- bError = true;
- }
- // - c
- c = y + 2.5f;
- if(c != 0)
- {
- c = arctan(c);
- }
- else
- {
- bError = true;
- }
- if(!bError)
- {
- int min = a;
- if(b < min)
- min = b;
- if(c < min)
- min = c;
- cout << min;
- }
- else
- {
- cout << "Ошибка ввода!\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement