Advertisement
Evgeniy175

Untitled

Nov 25th, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include "time.h"
  3. using namespace std;
  4. int main()
  5. {
  6.     setlocale(LC_CTYPE, "Russian");
  7.     double x, a = 105 * pow(10, (-4)), s, p;
  8.     int m = 4, i = 7, k;
  9.     for (k = 1; k <= 4; k++)
  10.     {
  11.         cout << "Введите x" << k << ": ";
  12.         cin >> x;
  13.         s = exp((-a)*x) - ((log(i / (x*m))) / pow(log(m), 2));
  14.         if (s > 2 * x) p = pow((-i)*s, 2);
  15.         if (s <= 2 * x) p = sin((-6)*s);
  16.         cout << "s=" << s << "  p=" << p << '\n';
  17.     }
  18.     system("pause");
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement