This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <math.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| int main(void) | |
| { | |
| int i = 0; | |
| int pairCount = 0; | |
| int size = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <string.h> | |
| #define SIZE 10 | |
| #define STRING_SIZE 20 | |
| struct Detail | |
| { | |
| // индекс элемента в массиве перед сортировкой | |
| unsigned int index; //4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <math.h> | |
| #include <stdlib.h> | |
| int main(void) | |
| { | |
| int size = 0; | |
| int x, y, step; | |
| int value = 0; | |
| int stepCount = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <io.h> | |
| #include <fcntl.h> | |
| #include <sys\stat.h> | |
| // данные о любом действии, которое нам понадобится | |
| struct ActionInfo | |
| { | |
| // имя действия |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define SIZE 100 | |
| int numbers[SIZE]; | |
| int main(void) | |
| { | |
| int i, j; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int compareString(char* first, char* second) | |
| { | |
| char*first = FER | |
| for(; FER; char--, char++); | |
| if (char*first = ) | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #define TEST(a, b, mustBe) \ | |
| if(mustBe != compareString(a, b)) { printf("Error > "); } \ | |
| printf("%s %s %s\n", a, compareString(a, b) ? "==" : "!=", b); | |
| char downcaseChar(char value) | |
| { | |
| if(value >= 65 && value <= 90) | |
| value += 32; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #define TEST(a, b, mustBe) \ | |
| if(mustBe != compareString(a, b)) { printf("Error > "); } \ | |
| printf("%s %s %s\n", a, compareString(a, b) ? "==" : "!=", b); | |
| //Функция сравнивает две строки (часть 1) | |
| //игнорируя различия в регистрах. (часть 2) | |
| char upperChar(char value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #define TEST(a, b, mustBe) \ | |
| if(mustBe != compareString(a, b)) { printf("Error > "); } \ | |
| printf("%s %s %s\n", a, compareString(a, b) ? "==" : "!=", b); | |
| //Функция сравнивает две строки (часть 1) | |
| //игнорируя различия в регистрах. (часть 2) | |
| char upperChar(char value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #define TEST(a, b, mustBe) \ | |
| if(mustBe != getWordLength(a, b)) { printf("Error > "); } \ | |
| printf("\"%s\" word with index %d has length %d, must be %d\n", a, b, getWordLength(a, b), mustBe); | |
| //Функция определяет длину слова с заданным номером | |
| //0 если слово не нашлось | |
| int getWordLength(char* sentence, int index) |