Skip to content

Comments

Считалочка#5

Open
shannami wants to merge 4 commits intomainfrom
homework6Task2
Open

Считалочка#5
shannami wants to merge 4 commits intomainfrom
homework6Task2

Conversation

@shannami
Copy link
Owner

Шалахина Анна б143, дз 6

@shannami shannami requested a review from WoWaster October 28, 2025 19:46
Copy link
Collaborator

@WoWaster WoWaster left a comment

Choose a reason for hiding this comment

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

В остальном круто.

src/hello.c Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

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

Этот файл здесь точно не нужен.

src/warriors.c Outdated
Comment on lines 4 to 7
typedef struct Node {
int value;
struct Node* next;
} Node;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Вообще в идеале бы сделать из этого отдельную библиотеку.

struct Node* next;
} Node;

Node* createCircle(int n)
Copy link
Collaborator

Choose a reason for hiding this comment

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

А что будет, если сюда передать 0? А -1?

src/warriors.c Outdated
return head;
}

int warrios(int n, int m)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
int warrios(int n, int m)
int warriors(int n, int m)

src/warriors.c Outdated
int warrios(int n, int m)
{
Node* head = createCircle(n);
Node* ptr = head;
Copy link
Collaborator

Choose a reason for hiding this comment

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

А правда эта переменная нужна?

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.

2 participants