diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..87f6767 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +main* \ No newline at end of file diff --git a/Cviko4_1/Makefile b/Cviko4_1/Makefile new file mode 100644 index 0000000..2d8af15 --- /dev/null +++ b/Cviko4_1/Makefile @@ -0,0 +1,12 @@ +all: main + +CC = clang +override CFLAGS += -std=c11 -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -Wno-unused-result -Wno-unknown-pragmas -pedantic -lm + +main: main.c + $(CC) $(CFLAGS) -O0 ./*.c -o "$@" +run: main + ./main $(ARGS) + +clean: + rm -f main main-* diff --git a/Cviko4_1/types.h b/Cviko4_1/types.h new file mode 100644 index 0000000..fcc2fe2 --- /dev/null +++ b/Cviko4_1/types.h @@ -0,0 +1,18 @@ +/** + * Hlavičkový soubor types.h + * + * OBSAH V TOMTO SOUBROU NEUPRAVUJTE! + */ + +#include + +#ifndef TYPES_H +#define TYPES_H + +// DEKLAROVANÉ HLAVIČKY FUNKCÍ NIJAK NEMĚŇTE + +bool is_alpha(char c); + +bool is_name(char arr[]); + +#endif diff --git a/Cviko4_2/Makefile b/Cviko4_2/Makefile new file mode 100644 index 0000000..2d8af15 --- /dev/null +++ b/Cviko4_2/Makefile @@ -0,0 +1,12 @@ +all: main + +CC = clang +override CFLAGS += -std=c11 -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -Wno-unused-result -Wno-unknown-pragmas -pedantic -lm + +main: main.c + $(CC) $(CFLAGS) -O0 ./*.c -o "$@" +run: main + ./main $(ARGS) + +clean: + rm -f main main-* diff --git a/Cviko4_2/types.h b/Cviko4_2/types.h new file mode 100644 index 0000000..918ca81 --- /dev/null +++ b/Cviko4_2/types.h @@ -0,0 +1,20 @@ +/** + * Hlavičkový soubor types.h + * + * OBSAH V TOMTO SOUBROU NEUPRAVUJTE! + */ + +#include + +#ifndef TYPES_H +#define TYPES_H + +// DEKLAROVANÉ HLAVIČKY FUNKCÍ NIJAK NEMĚŇTE + +int get_max(int array[], int length); + +int get_sum(int array[], int length); + +bool values_are_smaller_than(int array1[], int array2[], int array_length); + +#endif diff --git a/Cviko4_3/Makefile b/Cviko4_3/Makefile new file mode 100644 index 0000000..2d8af15 --- /dev/null +++ b/Cviko4_3/Makefile @@ -0,0 +1,12 @@ +all: main + +CC = clang +override CFLAGS += -std=c11 -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -Wno-unused-result -Wno-unknown-pragmas -pedantic -lm + +main: main.c + $(CC) $(CFLAGS) -O0 ./*.c -o "$@" +run: main + ./main $(ARGS) + +clean: + rm -f main main-* diff --git a/Cviko4_3/types.h b/Cviko4_3/types.h new file mode 100644 index 0000000..adcf916 --- /dev/null +++ b/Cviko4_3/types.h @@ -0,0 +1,26 @@ +/** + * Hlavičkový soubor types.h + * + * OBSAH V TOMTO SOUBROU NEUPRAVUJTE! + */ + +#include + +#ifndef TYPES_H +#define TYPES_H + +// DEKLAROVANÉ HLAVIČKY FUNKCÍ NIJAK NEMĚŇTE + +bool is_in_set(int set[], int length, int value); + +bool is_set(int set[], int length); + +bool is_sorted_set(int set[], int length); + +void print_intersection(int set1[], int set2[], int set1_length, int set2_length); + +void print_union(int set1[], int set2[], int set1_length, int set2_length); + +void print_product(int set1[], int set2[], int set1_length, int set2_length); + +#endif