A sharp (#) placed before a note raises the tone one half step and a flat (b) lowers a tone one half step.
The sharp keys will be considered first and a sharp major scale will be built from each of the twelve tones.
Rule 1. The Fifth of a Scale is the Tonic (or 1) of the Scale having the next Number of Sharps.
C has no sharps, the fifth of C is g and therefore by following the rule, we find that G has one sharp. The scale of G is as follows:—
G a b c d e f# G
1 2 3∼4 5 6 7∼8
Notice that the seventh of the scale is a black key.
The fifth of G is d and has two sharps:—
D e f# g a b c# D
1 2 3∼4 5 6 7∼8