From f4fc7440f85c6b9108795d0359967c3e06726097 Mon Sep 17 00:00:00 2001 From: Vladimir Popov <6939832+vladimir-popov@users.noreply.github.com> Date: Sun, 21 Jan 2024 15:12:05 +0400 Subject: [PATCH] Add used types to the pythagorean_triplet.h --- .../pythagorean-triplet/pythagorean_triplet.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/exercises/practice/pythagorean-triplet/pythagorean_triplet.h b/exercises/practice/pythagorean-triplet/pythagorean_triplet.h index a911dfa55..f74066932 100644 --- a/exercises/practice/pythagorean-triplet/pythagorean_triplet.h +++ b/exercises/practice/pythagorean-triplet/pythagorean_triplet.h @@ -1,4 +1,21 @@ #ifndef PYTHAGOREAN_TRIPLET_H #define PYTHAGOREAN_TRIPLET_H +#include + +typedef struct +{ + int a, b, c; +} triplet_t; + +typedef struct +{ + int count; + triplet_t *triplets; +} triplets_t; + +triplets_t *triplets_with_sum (uint16_t sum); + +void free_triplets (triplets_t *pt); + #endif