Answer:
36 pegs (for the hypotenuse)
About 51 pegs (for the legs)
138 pegs (total)
Explanation:
Along the hypotenuse, the pegs are placed every half-inch. That would make 2 pegs per inch. Multiply 2 x 18 to get 36.
The legs are each 9 sqrt 2. This is 12.7279220614. The pegs are placed at each quarter inch for the legs. This is 4 per inch. So multiply 12.7279220614 x 4 to get 50.9116882454. Round this to 51.
Add 51 + 51 for the legs total pegs. You get 102. Add 102 + 36 to get 138 pegs total.
Hope it helps!