#include <iostream> #include <cmath> int main() { double a, b, c, d, G, A, B, x, z; std::cout << "Enter a value for a: "; std::cin >> a; if (a < 67 && a > 6) { b = a * a; c = a + 4 * b - 2; x = c * c; z = (x < 0) ? 4 : (x == 0) ? 0 : (x > 0) ? 1 : -1; G = (64 * sqrt(23 * cos(a + b))) / ((b * b * b) - cos(a)); A = ((sin(b) * sin(b) * sin(b)) + (b * b)) / ((exp(b)) + (0.95 * cos(2 * b))); B = log(25 + 14 * c) + (cos(d) * cos(d)) - sqrt(23); std::cout << "G = " << G << std::endl; std::cout << "A = " << A << std::endl; std::cout << "B = " << B << std::endl; } else { std::cout << "Invalid value for a. Please enter a value such that 6 < a < 67." << std::endl; } return 0; }
#include <cmath>
int main() {
double a, b, c, d, G, A, B, x, z;
std::cout << "Enter a value for a: ";
std::cin >> a;
if (a < 67 && a > 6) {
b = a * a;
c = a + 4 * b - 2;
x = c * c;
z = (x < 0) ? 4 : (x == 0) ? 0 : (x > 0) ? 1 : -1;
G = (64 * sqrt(23 * cos(a + b))) / ((b * b * b) - cos(a));
A = ((sin(b) * sin(b) * sin(b)) + (b * b)) / ((exp(b)) + (0.95 * cos(2 * b)));
B = log(25 + 14 * c) + (cos(d) * cos(d)) - sqrt(23);
std::cout << "G = " << G << std::endl;
std::cout << "A = " << A << std::endl;
std::cout << "B = " << B << std::endl;
} else {
std::cout << "Invalid value for a. Please enter a value such that 6 < a < 67." << std::endl;
}
return 0;
}