Skip to content

Conversation

@NishonovA
Copy link
Collaborator

No description provided.

@@ -0,0 +1,83 @@
void piki (float* amplitudes, float* frequences, float* x, float* y, int* l) //x, y - ��� �������� �����; l - ����� ����� �������� �����
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чудовищное название функции. Переименуйте.
Длинна строки 80 символов
Комментарии к функции на новой строке
отступ 4 пробела

{int i, j, t, flag;
l=0;
for (i=0; i<=q; i++) //���� �� ��������� �������, ��� N - ������������ ���-�� �������� � �������� ���
if (amplitudes[i]>501)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что такое 501? почему именно это число?

@@ -0,0 +1,83 @@
void piki (float* amplitudes, float* frequences, float* x, float* y, int* l) //x, y - ��� �������� �����; l - ����� ����� �������� �����
{int i, j, t, flag;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

перенос строки после открывающей скобки

@@ -0,0 +1,83 @@
void piki (float* amplitudes, float* frequences, float* x, float* y, int* l) //x, y - ��� �������� �����; l - ����� ����� �������� �����
{int i, j, t, flag;
l=0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пробелы вокруг знака присваивания

void piki (float* amplitudes, float* frequences, float* x, float* y, int* l) //x, y - ��� �������� �����; l - ����� ����� �������� �����
{int i, j, t, flag;
l=0;
for (i=0; i<=q; i++) //���� �� ��������� �������, ��� N - ������������ ���-�� �������� � �������� ���
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пробелы вокруг = и <=

void piki (float* amplitudes, float* frequences, float* x, float* y, int* l) //x, y - ��� �������� �����; l - ����� ����� �������� �����
{int i, j, t, flag;
l=0;
for (i=0; i<=q; i++) //���� �� ��������� �������, ��� N - ������������ ���-�� �������� � �������� ���
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

преинкремент быстрее, так что используйте преинкремент
Пробелы вокруг =, <=

{int i, j, t, flag;
l=0;
for (i=0; i<=q; i++) //���� �� ��������� �������, ��� N - ������������ ���-�� �������� � �������� ���
if (amplitudes[i]>501)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Пробелы вокруг >
И далее вокруг всех операций, кроме пост и преинкремента

if (amplitudes[i]>501)
{
t=501;
while ((amplitudes[i]>501)&&(i<=q)) //������������� ���
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while ((amplitudes[i] > 501) && (i <= q))

for (i=0; i<=q; i++) //���� �� ��������� �������, ��� N - ������������ ���-�� �������� � �������� ���
if (amplitudes[i]>501)
{
t=501;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что такое 501? Почему 501, а не 1674 или 927592825?
Создайте константу и дайте ей внятное имя

{ //n - ���-�� ����� ����� � ����, l - ���-�� ����� �������� �����
int i, flag;
float m, k;
if (l==0) print("������� �� ������"); //���� ����� ���
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (statement1)
{
operator;
}
else if (statement2)
{
...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants