diff options
author | Franciszek Malinka <franciszek.malinka@gmail.com> | 2021-10-05 21:49:54 +0200 |
---|---|---|
committer | Franciszek Malinka <franciszek.malinka@gmail.com> | 2021-10-05 21:49:54 +0200 |
commit | c5fcf7179a83ef65c86c6a4a390029149e518649 (patch) | |
tree | d29ffc5b86a0d257453cedcf87d91a13d8bf3b0d /Semestr 4/ask/lista6/puzzle8.c | |
parent | f8a88b6a4aba1f66d04711a9330eaba49a50c463 (diff) |
Duzy commit ze smieciami
Diffstat (limited to 'Semestr 4/ask/lista6/puzzle8.c')
-rw-r--r-- | Semestr 4/ask/lista6/puzzle8.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Semestr 4/ask/lista6/puzzle8.c b/Semestr 4/ask/lista6/puzzle8.c deleted file mode 100644 index 4d65f9d..0000000 --- a/Semestr 4/ask/lista6/puzzle8.c +++ /dev/null @@ -1,25 +0,0 @@ -#include <limits.h> - -struct T { - long min; - long max; - long mean; -}; - -struct T puzzle8(long *a, long n); - -struct T decode(long *a, long n) { - long maks = LONG_MIN; - long mini = LONG_MAX; - long sum = 0; - for (int i = 0; i < n; i++) { - if (maks < a[i]) maks = a[i]; - if (mini > a[i]) mini = a[i]; - sum += a[i]; - } - struct T ret; - ret.min = mini; - ret.max = maks; - ret.mean = sum / n; - return ret; -}
\ No newline at end of file |