Skip to content

Instantly share code, notes, and snippets.

View alexesDev's full-sized avatar

Alexey Yurchenko alexesDev

  • Digital Nomad
View GitHub Profile
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
int main(void)
{
int i = 0;
int pairCount = 0;
int size = 0;
#include <stdio.h>
#include <string.h>
#define SIZE 10
#define STRING_SIZE 20
struct Detail
{
// индекс элемента в массиве перед сортировкой
unsigned int index; //4
#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;
#include <stdio.h>
#include <stdlib.h>
#include <io.h>
#include <fcntl.h>
#include <sys\stat.h>
// данные о любом действии, которое нам понадобится
struct ActionInfo
{
// имя действия
#include <stdio.h>
#include <stdlib.h>
#define SIZE 100
int numbers[SIZE];
int main(void)
{
int i, j;
int compareString(char* first, char* second)
{
char*first = FER
for(; FER; char--, char++);
if (char*first = )
return 0;
}
#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;
#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)
#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)
#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)