Advertisement
Guest User

Dimas spasai

a guest
Oct 13th, 2015
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.92 KB | None | 0 0
  1. // triplefunc.cpp: определяет точку входа для консольного приложения.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <iomanip>
  7. using namespace std;
  8.  
  9. int _tmain(int argc, _TCHAR* argv[])
  10. {
  11.     double x, t;
  12.     const double a=3.5, b=6.8;
  13.  
  14.     cout << "xn = -3" << endl;
  15.     cout << "xk = 3" << endl;
  16.     cout << "a = 3.5" << endl;
  17.     cout << "b = 6.8" << endl;
  18.     cout << "Shag dx = 0.5" << endl;
  19.     cout << endl;
  20.  
  21.     //для каждого x свой t
  22.     cout << "Pervaya chast' programmi: " << endl;
  23.     for(x=-3;  x<=3; x+=0.5)    // xn=<x<=xk
  24.         {
  25.          t=abs(a- (b*pow(x, 1/3)) )/cos(b) + sin(a) -12;
  26.          cout << "Znacheniye x: " << x << setw(35) << " Sootv. znacheniye t: " << t << endl;
  27.         }
  28.  
  29.     //посчитать f=сумма всех t/ произведение всех t
  30.     cout << endl << "Vtoraya chast' programmi: " << endl;
  31.     double f;
  32.    
  33.  
  34.     cout << endl;
  35.     system("pause");
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement