This commit is contained in:
Matyáš Caras 2024-10-10 17:13:14 +02:00
parent 03a90c10be
commit c3236bb92b
Signed by: hernik
GPG key ID: 2A3175F98820C5C6
7 changed files with 101 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
main*

12
Cviko4_1/Makefile Normal file
View file

@ -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-*

18
Cviko4_1/types.h Normal file
View file

@ -0,0 +1,18 @@
/**
* Hlavičkový soubor types.h
*
* OBSAH V TOMTO SOUBROU NEUPRAVUJTE!
*/
#include <stdbool.h>
#ifndef TYPES_H
#define TYPES_H
// DEKLAROVANÉ HLAVIČKY FUNKCÍ NIJAK NEMĚŇTE
bool is_alpha(char c);
bool is_name(char arr[]);
#endif

12
Cviko4_2/Makefile Normal file
View file

@ -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-*

20
Cviko4_2/types.h Normal file
View file

@ -0,0 +1,20 @@
/**
* Hlavičkový soubor types.h
*
* OBSAH V TOMTO SOUBROU NEUPRAVUJTE!
*/
#include <stdbool.h>
#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

12
Cviko4_3/Makefile Normal file
View file

@ -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-*

26
Cviko4_3/types.h Normal file
View file

@ -0,0 +1,26 @@
/**
* Hlavičkový soubor types.h
*
* OBSAH V TOMTO SOUBROU NEUPRAVUJTE!
*/
#include <stdbool.h>
#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