SHARE
TWEET

Untitled

a guest Oct 14th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main(){
  5. setlocale(0, "");
  6. double a, m, z;
  7. const float pi=3.141593;
  8. cout<<"Введите угол альфа в градусах: ";
  9. cin>>a;
  10.    
  11. if ((cos(3*a*pi/180)!=-1) && (cos(3*a*pi/180)>=0)) {
  12.    
  13.      m=cos(3*a*pi/180)/(1.+cos(3*a*pi/180));
  14.      
  15.      z=-sqrt(m);
  16.    
  17.        cout<<"m= "<<m<<endl<<"z= "<<z;
  18.     }
  19. else
  20.      cout<<"Уравнение не имеет смысла при данном угле альфа. Попробуйте ввести иное значение.";              
  21.  
  22. return 0;      
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top