Draw fig with sises AB, BC &CD.. OF REGULAR POLYGON) Now, CD is perpend to AB. Produce AB, and also DC, meeting at rt angle at say K
i) Let interior angle betn two consecutive sides be x so triangle CKB will be right angled at K with each of the angle CBK= BCK = 180-x. So in rt triangle BCK, sum of two angles (other than 90 deg,)= 90. OR, 2(180 - x)= 90 so x= 135 deg
ii). Sum of all Int angle of a regular polygon = (n-2)*180 . where n= no of sides of polygon.
So n*135= (n-2)*180. Solving that, we get n= 8