Post History
C (gcc), 133 131 bytes f(p,s){char*t="Hole in one\0Albatross\0Eagle\0Birdie\0Par\0Bogey\0Double bogey\0Triple bogey";for(--s?s+=5-p:0;s-=!*t++;);puts(t);} Saved two bytes thanks to m90 in the...
Answer
#2: Post edited
# [C (gcc)], 133 bytes- <!-- language-all: lang-c -->
f(p,s){char*t="Hole in one\0Albatross\0Eagle\0Birdie\0Par\0Bogey\0Double bogey\0Triple bogey";for(--s?s+=5-p:0;s;*t++||s--);puts(t);}[Try it online!][TIO-kwc6d8n5]- [C (gcc)]: https://gcc.gnu.org/
[TIO-kwc6d8n5]: https://tio.run/##hVJRT4MwEH7nV1wwJjBAUTdj7KbRaOKjD76NxbBSZhNGSa8YdfLb5wEZAR4maVL6fffdtd8dDzac7/epU/jo7vhHrCdmYb@oTIDMQeUiCh@ydWy0QozC53iTEfIodSJpf401HdRGfEfhkyrXJFq3pzcti8PJZqnSThDgPXqLWVDchgzZxHje7y8GgcuK0qBjXFbtT2TOszIRMEeTSHX2cWdZ5rsQiUgBjS65ASPQ8BiFtbOAbmigiLUPyJUWjJD6AcBVjmYC4qsQ3IjkXQssM8OsqlMzy6q121jmjtukOjDdDy5XsICaqr8dTP162fRkGyq/D18R3DoyZmY101gwIi6JaLwcELOW6PwekFTlgsheZ8ZJj9GkviZ60JZR6Ztj/LTV95tMfEU@tl3Iy@175xz5hvJHqNTpIPd8jCzDldvIaTjAqXNI0oWMtvkwHQPPky5Fts0oNAWnjn2aAK2N/KSCtt/rm1ydNUMxQJoJcVmToX@Lf4MP5WiqtKZ5uoVTjPIoH5ccTVujrqxq/wc "C (gcc) – Try It Online"
- # [C (gcc)], <s>133</s> 131 bytes
- <!-- language-all: lang-c -->
- f(p,s){char*t="Hole in one\0Albatross\0Eagle\0Birdie\0Par\0Bogey\0Double bogey\0Triple bogey";for(--s?s+=5-p:0;s-=!*t++;);puts(t);}
- Saved two bytes thanks to [m90](https://codegolf.codidact.com/users/54227) in the [comments.](https://codegolf.codidact.com/comments/thread/5021#comment-14711)
- [Try it online!][TIO-kwdw39p3]
- [C (gcc)]: https://gcc.gnu.org/
- [TIO-kwdw39p3]: https://tio.run/##hZJRT4MwEMff@RQnZgkMUNTNGOs0Gk189MG3sRhWymyClPSKcS589nlARoCHSZpA/7/@78rd8WDD@X6fOoWP7o5/xnpqFvarygTIHFQuovAxW8dGK8QofIk3GSlPUieS3m@xpo3aiG0UPqtyTaZ1u3vXsjjsbJYq7QQBPqC3mAfFbcgwWJxMjecxlxWlQce4rNqfypxnZSLgDk0i1dnnvWWZbSESkQIaXXIDRqDhMQprZwHdz0ARax@QKy0YKfX1gasczRTETyG4EcmHFlhmhllV52aWVXu/Ypk7bhPqQLoPXK5gATWqnx3M/HrZ9MM2VH5fviK5rceYzGvSFGAELgk0lRyAeQu6ag8gZbkg2OvLOOgxTO5rwoOmjFLfHOOz1t9vMfGK6th2IS@/PrrKUd1Q/gqVOp3kno@VZbhyGzuNBjh1DEm@kNHrbhiOgedJl062zSg0HU4de5IArY38poS23@ubXJ01QzFQmglxWROhf4t/Dx/S0VRpTfN0CxOM8igfpxxNW@OurGr/Bw "C (gcc) – Try It Online"
#1: Initial revision
# [C (gcc)], 133 bytes <!-- language-all: lang-c --> f(p,s){char*t="Hole in one\0Albatross\0Eagle\0Birdie\0Par\0Bogey\0Double bogey\0Triple bogey";for(--s?s+=5-p:0;s;*t++||s--);puts(t);} [Try it online!][TIO-kwc6d8n5] [C (gcc)]: https://gcc.gnu.org/ [TIO-kwc6d8n5]: https://tio.run/##hVJRT4MwEH7nV1wwJjBAUTdj7KbRaOKjD76NxbBSZhNGSa8YdfLb5wEZAR4maVL6fffdtd8dDzac7/epU/jo7vhHrCdmYb@oTIDMQeUiCh@ydWy0QozC53iTEfIodSJpf401HdRGfEfhkyrXJFq3pzcti8PJZqnSThDgPXqLWVDchgzZxHje7y8GgcuK0qBjXFbtT2TOszIRMEeTSHX2cWdZ5rsQiUgBjS65ASPQ8BiFtbOAbmigiLUPyJUWjJD6AcBVjmYC4qsQ3IjkXQssM8OsqlMzy6q121jmjtukOjDdDy5XsICaqr8dTP162fRkGyq/D18R3DoyZmY101gwIi6JaLwcELOW6PwekFTlgsheZ8ZJj9GkviZ60JZR6Ztj/LTV95tMfEU@tl3Iy@175xz5hvJHqNTpIPd8jCzDldvIaTjAqXNI0oWMtvkwHQPPky5Fts0oNAWnjn2aAK2N/KSCtt/rm1ydNUMxQJoJcVmToX@Lf4MP5WiqtKZ5uoVTjPIoH5ccTVujrqxq/wc "C (gcc) – Try It Online"