Skip to main content
Tweeted twitter.com/StackCodeGolf/status/907051677055897600
added 188 characters in body
Source Link

I'm surprised this hasn't come up in a challenge yet.

Output the IP address of the machine you're running on. You are required to output both the local and external IP addresses.

Local IP address, ie along the default format of 192.168.x.x

Public IP address can be verified by using google https://www.google.co.uk/search?source=hp&q=whats+my+ip

Output can be in any format. IPv4 or IPv6 or any mix of each is allowed, however they must be the only output. Code can be a full program or a function.

rules apply so shortest code wins.

Standard Loopholes are forbidden.

EDIT: As per @Peter Taylor's comment, in the case where multiple of either type of address are present, you can choose to either output the first one, or as many as you can access. So long as at least one local and one public are present.

I'm surprised this hasn't come up in a challenge yet.

Output the IP address of the machine you're running on. You are required to output both the local and external IP addresses.

Local IP address, ie along the default format of 192.168.x.x

Public IP address can be verified by using google https://www.google.co.uk/search?source=hp&q=whats+my+ip

Output can be in any format. IPv4 or IPv6 or any mix of each is allowed, however they must be the only output. Code can be a full program or a function.

rules apply so shortest code wins.

Standard Loopholes are forbidden.

I'm surprised this hasn't come up in a challenge yet.

Output the IP address of the machine you're running on. You are required to output both the local and external IP addresses.

Local IP address, ie along the default format of 192.168.x.x

Public IP address can be verified by using google https://www.google.co.uk/search?source=hp&q=whats+my+ip

Output can be in any format. IPv4 or IPv6 or any mix of each is allowed, however they must be the only output. Code can be a full program or a function.

rules apply so shortest code wins.

Standard Loopholes are forbidden.

EDIT: As per @Peter Taylor's comment, in the case where multiple of either type of address are present, you can choose to either output the first one, or as many as you can access. So long as at least one local and one public are present.

added 86 characters in body
Source Link

I'm surprised this hasn't come up in a challenge yet.

Output the IP address of the machine you're running on. You are required to output both the local and external IP addresses.

Local IP address, ie along the default format of 192.168.x.x

Public IP address can be verified by using google https://www.google.co.uk/search?source=hp&q=whats+my+ip

Output can be in any format. IPv4 or IPv6 or any mix of each is allowed, however they must be the only output. Code can be a full program or a function.

rules apply so shortest code wins.

Standard Loopholes are forbidden.

I'm surprised this hasn't come up in a challenge yet.

Output the IP address of the machine you're running on. You are required to output both the local and external IP addresses.

Local IP address, ie along the default format of 192.168.x.x

Public IP address can be verified by using google https://www.google.co.uk/search?source=hp&q=whats+my+ip

Output can be in any format. Code can be full program or function.

rules apply so shortest code wins.

Standard Loopholes are forbidden.

I'm surprised this hasn't come up in a challenge yet.

Output the IP address of the machine you're running on. You are required to output both the local and external IP addresses.

Local IP address, ie along the default format of 192.168.x.x

Public IP address can be verified by using google https://www.google.co.uk/search?source=hp&q=whats+my+ip

Output can be in any format. IPv4 or IPv6 or any mix of each is allowed, however they must be the only output. Code can be a full program or a function.

rules apply so shortest code wins.

Standard Loopholes are forbidden.

deleted 4 characters in body
Source Link

I'm surprised this hasn't come up in a challenge yet.

Using only the input of 1 or 0, outputOutput the IP address of the machine you're running on. You are required to output both the local and external IP addresses.

0 Being, output my localLocal IP address, ie along the default format of 192.168.x.x

1 Being, output the publicPublic IP address, can be verified by using google https://www.google.co.uk/search?source=hp&q=whats+my+ip

Output can be in any format. Code can be full program or function.

rules apply so shortest code wins.

Standard Loopholes are forbidden.

I'm surprised this hasn't come up in a challenge yet.

Using only the input of 1 or 0, output the IP address of the machine you're running on.

0 Being, output my local IP address, ie along the default format of 192.168.x.x

1 Being, output the public IP address, can be verified by using google https://www.google.co.uk/search?source=hp&q=whats+my+ip

Output can be in any format. Code can be full program or function.

rules apply so shortest code wins.

Standard Loopholes are forbidden.

I'm surprised this hasn't come up in a challenge yet.

Output the IP address of the machine you're running on. You are required to output both the local and external IP addresses.

Local IP address, ie along the default format of 192.168.x.x

Public IP address can be verified by using google https://www.google.co.uk/search?source=hp&q=whats+my+ip

Output can be in any format. Code can be full program or function.

rules apply so shortest code wins.

Standard Loopholes are forbidden.

quite short on tags :P
Link
Mr. Xcoder
  • 42.5k
  • 9
  • 81
  • 214
Loading
Source Link
Loading