#include <iostream>
#include <cmath>
using namespace std;
int main(){
float a,b,x,y,Answer;
cout << "Enter a: \n";
cin >> a;
cout << "Enter b: \n";
cin >> b;
cout << "Enter x: \n";
cin >> x;
cout << "Enter y: \n";
cin >> y;
float DownSide = ((1 - cos(2 * ((2 * asin(x)) + log10(y)))) / 2);
if(DownSide == 0){
cout << "Can't divide by zero \n";
}else{
Answer = ((pow(y, -a * x)) - (a * sqrt(6)) - (cos(3 * a * b))) / DownSide;
cout << "Your answer: \n";
cout << Answer;
}
return 0;
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
#include <cmath>
using namespace std;
int main(){
float a,b,x,y,Answer;
cout << "Enter a: \n";
cin >> a;
cout << "Enter b: \n";
cin >> b;
cout << "Enter x: \n";
cin >> x;
cout << "Enter y: \n";
cin >> y;
float DownSide = ((1 - cos(2 * ((2 * asin(x)) + log10(y)))) / 2);
if(DownSide == 0){
cout << "Can't divide by zero \n";
}else{
Answer = ((pow(y, -a * x)) - (a * sqrt(6)) - (cos(3 * a * b))) / DownSide;
cout << "Your answer: \n";
cout << Answer;
}
return 0;
}
cin >> a;
cout << "Enter b: \n";
cin >> b;
cout << "Enter x: \n";
cin >> x;
if(x < -1 || x > 1){
while(x < -1 || x > 1){
cout << "x should be between -1 and 1 \n";
cout << "Enter x: \n";
cin >> x;
}
}
cout << "Enter y: \n";
cin >> y;
Можете вот такой ввод в код добавить, с ним должно работать