-
-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve the zebra-puzzle. * add forgotten file, fix format * fix format * fix format * consistent struct definition with typedef Co-authored-by: Ryan Hartlage <[email protected]> * use solution_t consistently --------- Co-authored-by: Ryan Hartlage <[email protected]>
- Loading branch information
1 parent
44caea3
commit 59efe93
Showing
4 changed files
with
39 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
#ifndef ZEBRA_PUZZLE_H | ||
#define ZEBRA_PUZZLE_H | ||
|
||
/// Determine the nationality of the resident who drinks water. | ||
const char *drinks_water(void); | ||
typedef struct { | ||
const char *drinks_water; | ||
const char *owns_zebra; | ||
} solution_t; | ||
|
||
/// Determine the nationality of the resident who owns the zebra. | ||
const char *owns_zebra(void); | ||
solution_t solve_puzzle(void); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
#ifndef ZEBRA_PUZZLE_H | ||
#define ZEBRA_PUZZLE_H | ||
|
||
/// Determine the nationality of the resident who drinks water. | ||
const char *drinks_water(void); | ||
typedef struct { | ||
const char *drinks_water; | ||
const char *owns_zebra; | ||
} solution_t; | ||
|
||
/// Determine the nationality of the resident who owns the zebra. | ||
const char *owns_zebra(void); | ||
solution_t solve_puzzle(void); | ||
|
||
#endif |