@FreeMan108
121 / 121 / 6
Регистрация: 04.03.2013
Сообщений: 370
|
13.05.2013, 22:08
|
|
Оно?
C++ | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| #include <cstdlib>
#include <iostream>
#include <cmath>
using namespace std;
int main(int argc, char *argv[])
{
int U = 6;
float T = 0.00001;
for (double t = 0; t < T; t+=0.0000001) {
cout << t << " ";
if (t <= T/2)
cout << "0" << endl;
else
cout << U*sin(4*M_PI*t/T) << endl;
}
system("PAUSE");
return EXIT_SUCCESS;
} |
|
1
|