Here is the example in C:
As a general guideline, when we are ascending the scale, we use sharps. (Notice I said guideline and not rule.) As we go down the scale, let's use flats instead of sharps:
We can learn a couple of things about music by looking at the ascending and descending Chromatic Scales. First, this lists out all of the available notes. There is not H or beyond note. Second, sharps and flats can describe the same tone. For example, as we move ascending from C to D we have a C# between them. Descending from D to C we have a Db. Those two notes, C# and Db, are the same tones.
The rules for the Chromatic Scale are the same in every key. Simply take the note you want to start one and move in half steps (or semitones) until you reach it's next octave.