Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // triplefunc.cpp: определяет точку входа для консольного приложения.
- //
- #include "stdafx.h"
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int _tmain(int argc, _TCHAR* argv[])
- {
- double x, t;
- const double a=3.5, b=6.8;
- cout << "xn = -3" << endl;
- cout << "xk = 3" << endl;
- cout << "a = 3.5" << endl;
- cout << "b = 6.8" << endl;
- cout << "Shag dx = 0.5" << endl;
- cout << endl;
- //для каждого x свой t
- cout << "Pervaya chast' programmi: " << endl;
- for(x=-3; x<=3; x+=0.5) // xn=<x<=xk
- {
- t=abs(a- (b*pow(x, 1/3)) )/cos(b) + sin(a) -12;
- cout << "Znacheniye x: " << x << setw(35) << " Sootv. znacheniye t: " << t << endl;
- }
- //посчитать f=сумма всех t/ произведение всех t
- cout << endl << "Vtoraya chast' programmi: " << endl;
- double f;
- cout << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement