total no from 100 to 999 inclusive of both are 900. Numbers starting with 7 are 100 numbers with 7 at end which does not contain 7 at the beginning is 80 and numbers with 7 in middle but with no 7 at start or end is 72 (we are excluding certain numbers coz they have already been counted)