Вот теперь вроде правильно работает
C++ |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
| #include <iostream>
#include <cmath>
using namespace std;
int main()
{
setlocale(0, "");
double a, z;
cout << "Введите а: ";
cin >> a;
cout << "t:\t" << "z:\n";
for(double t = -3; t < 3.1; t += 0.1)
{
if(t < -2)
{
z = -1.3 * pow(-t, 1./3) + pow(sin(pow( t,2)),2);
cout << t << "\t" << z << endl;
}
if(t >= 0.1 && t < 1)
{
z = pow((exp(t) + sqrt(t)),1./5);
cout << t << "\t" << z << endl;
}
if(t > 2.1)
{
z = log(t - a);
cout << t << "\t" << z << endl;
}
}
system("pause");
return 0;
} |
|