добавление работ по системному программированию

This commit is contained in:
IliyaSomoilov
2026-09-10 11:19:10 +03:00
parent 999fe959bf
commit 8ef9ec1469
6 changed files with 19 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
long divide_vars(long a, long b) {
return a / b;
}
+4
View File
@@ -0,0 +1,4 @@
#include <stdint.h>
uint16_t swap_bytes(uint16_t x) {
return (x << 8) | (x >> 8);
}
+3
View File
@@ -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; }
+7
View File
@@ -0,0 +1,7 @@
unsigned long factorial(int n) {
unsigned long res = 1;
for (int i = 2; i <= n; ++i) {
res *= i;
}
return res;
}
Binary file not shown.