Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by nerh ( 16 years ago )
#include <iostream>
#include <cmath>
using namespace std;
int main(){
double alpha,z1,z2;
bool have_result;
cout<<"Enter value of angle: ";
cin>>alpha;
alpha = 3.14/180*alpha;
if(cos(4*alpha)==-1 || cos(2*alpha) ==-1 || cos(3/2*3.14+alpha)==0){
have_result = false;
} else {
have_result = true;
z1 = sin(4*alpha)/(1+cos(4*alpha))*cos(2*alpha)/(1+cos(2*alpha));
z2 = tan(3/2*3.14+alpha);
}
if(have_result){
cout<<"z1 = "<<z1<<endl;
cout<<"z2 = "<<z2<<endl;
} else {
cout<<"Answer can't be calculated"<<endl;
}
return 0;
}
Revise this Paste
Children: 16404