diff --git a/Thumbs.db b/Thumbs.db new file mode 100644 index 0000000..6973c7c Binary files /dev/null and b/Thumbs.db differ diff --git a/works/C(system prog)/Task 1.c b/works/C(system prog)/Task 1.c new file mode 100644 index 0000000..fdca236 --- /dev/null +++ b/works/C(system prog)/Task 1.c @@ -0,0 +1,5 @@ +long divide_vars(long a, long b) { + return a / b; +} + + diff --git a/works/C(system prog)/Task 2.c b/works/C(system prog)/Task 2.c new file mode 100644 index 0000000..1e99ab3 --- /dev/null +++ b/works/C(system prog)/Task 2.c @@ -0,0 +1,4 @@ +#include +uint16_t swap_bytes(uint16_t x) { + return (x << 8) | (x >> 8); +} \ No newline at end of file diff --git a/works/C(system prog)/Task 4.c b/works/C(system prog)/Task 4.c new file mode 100644 index 0000000..dad2184 --- /dev/null +++ b/works/C(system prog)/Task 4.c @@ -0,0 +1,3 @@ +long mul3(long x) { return x * 3; } +long mul5(long x) { return x * 5; } +long mul9(long x) { return x * 9; } \ No newline at end of file diff --git a/works/C(system prog)/Task 5.c b/works/C(system prog)/Task 5.c new file mode 100644 index 0000000..6d3f146 --- /dev/null +++ b/works/C(system prog)/Task 5.c @@ -0,0 +1,7 @@ +unsigned long factorial(int n) { + unsigned long res = 1; + for (int i = 2; i <= n; ++i) { + res *= i; + } + return res; +} \ No newline at end of file diff --git a/works/C(system prog)/Thumbs.db b/works/C(system prog)/Thumbs.db new file mode 100644 index 0000000..cd31bb0 Binary files /dev/null and b/works/C(system prog)/Thumbs.db differ