I'm writing a code, which will output the first and last IP address of every subnet from a given IP.
for example if the IP address is 192.168.1.8/28 so if we calculate there are total 16 subnets. So, how do I find the start and last IP address of any subnet in it? (like 12th or 13th)
NOTE: (I'm looking for the logic not the actual code)