#Windows Batch - 65 62 61 bytes
Windows Batch - 65 62 61 bytes
btw this is my first PPCG answer
@for /l %%p in (40,2,72)do @echo %%p&@ping 1.1 -n 1 -w 10>nul
This exits when the degree reaches 72.
#76 75 bytes - Does not sleep at end
76 75 bytes - Does not sleep at end
@for /l %%p in (40,2,72)do @echo %%p&if %%p lss 72 @ping 1.1 -n 1 -w 10>nul
Ungolfed and explanation:
@echo off - Turns of the prompt(C:\Foo\Bar\Baz>)
for /l %%p in (40,2,72) do ( - For loop that loops from 40 to 72, increase 2 each
echo %%p - Outputs the loop counter(which is the temp.)
if %%p lss 72 ( - If loop counter is less than 72,
ping -n 1 -w 10 1.1 >nul - ping an non-existing IP to make delay
- note: ping will always make 500ms delay
- if waiting time is less than 500ms
) - Closing bracket(if statement)
) - Closing bracket(for statement)