Advertisement
Caneq

lb1.1.8

Oct 29th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. // lb1.1.8.cpp: определяет точку входа для консольного приложения.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <cmath>
  7. using namespace std;
  8.  
  9.  
  10. int main()
  11. {
  12.     int s, t;
  13.     double y, x;
  14.     cout << "Enter x, t, s" << endl;
  15.     cin >> x;
  16.     cin >> t;
  17.     cin >> s;
  18.     setlocale(LC_ALL, "rus");
  19.     if (s <= 0 || (t % 2 ==0 && x < 0)) {
  20.         cout << "Некоторые переменные не входят в область допустимых значений" << endl;
  21.     }
  22.     y = pow(cos(x*x), 2) / (s*pow(x, 1/t));
  23.     cout << y << endl;
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement