Diagonals in a polygon is obtained from the relation n(n-3)/2, where n is the number of sides of a polygon.
Octagon has 8 sides
So no. of diagonals in a Octagon = 8(8-3)/2 = 20 Ans.
Decagon has 10 sides
So, No. of digonals in a decagon = 10(10-3)/2 = 35 Ans.