-
Notifications
You must be signed in to change notification settings - Fork 0
Test #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
yurii-litvinov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Комментарии к коммитам ужасны :) Надо писать что-то содержательное, типа "Added solution for the first task" или что-то такое
| int arrayOFNumber[10] = {199, 36, 123, 1, 2, 6, 8, 9, 7, 10}; | ||
| int sum[10] = {0}; | ||
| return largestSun(arrayOFNumber, sum, 10) == 0; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| { | ||
| int arrayOFNumber[10] = {199, 36, 123, 1, 2, 6, 8, 9, 7, 10}; | ||
| int sum[10] = {0}; | ||
| return largestSun(arrayOFNumber, sum, 10) == 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
largestSun пока ещё не объявлен, должно быть предупреждение компилятора
|
|
||
| } | ||
|
|
||
| int largestSun(int *array,int* sum,int numberOfElements) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Самое большое Солнце"? :) Должно быть largestSum, наверное
|
|
||
| } | ||
|
|
||
| int largestSun(int *array,int* sum,int numberOfElements) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| int largestSun(int *array,int* sum,int numberOfElements) | |
| int largestSun(int *array, int* sum, int numberOfElements) |
| } | ||
| } | ||
| return j; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | |
| } | |
| for (int i = 0; i < numberOfElement - 1; i++) | ||
| { | ||
| int count = 0; | ||
| int temporary = arrayOfNumber[i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кажется, что temporary всегда равна arrayOfNumber[count], так что её можно явно не хранить было
| @@ -0,0 +1,23 @@ | |||
| #include "choiseSort.h" | |||
|
|
|||
| void sortChoise(int* arrayOfNumber, int numberOfElement) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| void sortChoise(int* arrayOfNumber, int numberOfElement) | |
| void sortChoice(int* arrayOfNumber, int numberOfElement) |
| int main() | ||
| { | ||
| setlocale(LC_ALL, "rus"); | ||
| if (!testSort�hoice()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
О, русская буква "С" в Choice. Это такое пожелание тем, кто будет сопровождать код, удачно разобраться с ошибками компиляции :)
| } | ||
| } | ||
| return true; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | |
| } | |
| @@ -0,0 +1,3 @@ | |||
| #pragma once | |||
|
|
|||
| void sortChoise(int* arrayOfNumber, int numberOfElement); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тоже надо было бы комментарии
No description provided.