Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- using namespace std;
- double maxn(double a, double b, double c) {
- if (a > b && a > c) {
- return(a);
- }
- if (b > a && b > c) {
- return(b);
- }
- return(c);
- }
- double minn(double a, double b, double c) {
- if (a < b && a < c) {
- return(a);
- }
- if (b < a && b < c) {
- return(b);
- }
- return(c);
- }
- double calculating(double a, double x) {
- if (a > x) {
- return(minn(pow(cos(a * x), 2), pow(sin(x), 3), a - x));
- }
- if (a == x) {
- return(exp(a + x));
- }
- return(maxn(log10(abs(a + x)), sqrt(abs(x)), 1));
- }
- void setax(double& a, double& x) {
- cin >> a;
- cin >> x;
- }
- void getc(double c) {
- cout << c << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement