Skip to content

The hexadecimal code of 9241 is incorrect. #1047

Open

Description

@MelancholyMing

The hexadecimal representation of 9241 is 0x2419.

int m_morales{9241};              // base 10: 0-9
int a_apaec{0x24CD};              // base 16: 0-9 and A-F
int m_gargan{0b10010000011001};   // base  2: 0-1
int b_reilly{022031};             // base  8: 0-7
                                  // Leading with a 0 not the letter o.

https://github.com/MelancholyMing/cpp/blob/e6e47e11fb47e561d0eca71c6197163695b44caf/concepts/numbers/about.md?plain=1#L9-L15

Activity

  1. github-actions commented on Oct 15, 2026

    @github-actions
    Contributor

    Hello. Thanks for opening an issue on Exercism 🙂

    At Exercism we use our Community Forum, not GitHub issues, as the primary place for discussion. That allows maintainers and contributors from across Exercism's ecosystem to discuss your problems/ideas/suggestions without them having to subscribe to hundreds of repositories.

    This issue will be automatically closed. Please use this link to copy your GitHub Issue into a new topic on the forum, where we look forward to chatting with you!

    If you're interested in learning more about this auto-responder, please read this blog post.

  2. siebenschlaefer commented on Oct 15, 2026

    @siebenschlaefer
    Contributor

    The issue is being discussed here: http://forum.exercism.org/t/the-hexadecimal-code-of-9241-is-incorrect/92665
    I agree that this is an issue that should be fixed.
    I'll wait one day, perhaps someone knows whether 9241 has a hidden meaning in this context and can propose a good alternative.
    Otherwise I'll pick a random integer.

  3. ahans commented on Oct 16, 2026

    @ahans
    Contributor

    Added a comment to the forum thread. Unless 9241 turns out to be special, I think we should do this instead of changing 0x24CD:

    int m_morales{9421};              // base 10: 0-9
    int a_apaec{0x24CD};              // base 16: 0-9 and A-F
    int m_gargan{0b10010011001101};   // base  2: 0-1
    int b_reilly{022031};             // base  8: 0-7
                                      // Leading with a 0 not the letter o.
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions