Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

C#, (削除) 131 (削除ここまで) bytes

Not much to explain. It just takes a string (wrapped in "") as argument and prints each character using the correct delay pattern. After the animation it exits with an OutOfRangeException because the loop doesn't stop after it looped over all characters. Since it's an infinite loop, that also means I can use int Main instead of void Main ;-)

Golfed

class C{static int Main(string[]a){for(int i=0;){System.Console.Write(a[0][i]);System.Threading.Thread.Sleep(i++%3<1?500:100);}}}

#Ungolfed

class C
{
 static int Main(string[] a)
 {
 for (int i = 0; ;)
 {
 System.Console.Write(a[0][i]);
 System.Threading.Thread.Sleep(i++ % 3 < 1 ? 500 : 100);
 }
 }
}

Edits

  • Saved 1 byte by moving incrementing i inside of the Sleep() method instead of in the for loop. (Thanks Maliafo Maliafo)

C#, (削除) 131 (削除ここまで) bytes

Not much to explain. It just takes a string (wrapped in "") as argument and prints each character using the correct delay pattern. After the animation it exits with an OutOfRangeException because the loop doesn't stop after it looped over all characters. Since it's an infinite loop, that also means I can use int Main instead of void Main ;-)

Golfed

class C{static int Main(string[]a){for(int i=0;){System.Console.Write(a[0][i]);System.Threading.Thread.Sleep(i++%3<1?500:100);}}}

#Ungolfed

class C
{
 static int Main(string[] a)
 {
 for (int i = 0; ;)
 {
 System.Console.Write(a[0][i]);
 System.Threading.Thread.Sleep(i++ % 3 < 1 ? 500 : 100);
 }
 }
}

Edits

  • Saved 1 byte by moving incrementing i inside of the Sleep() method instead of in the for loop. (Thanks Maliafo)

C#, (削除) 131 (削除ここまで) bytes

Not much to explain. It just takes a string (wrapped in "") as argument and prints each character using the correct delay pattern. After the animation it exits with an OutOfRangeException because the loop doesn't stop after it looped over all characters. Since it's an infinite loop, that also means I can use int Main instead of void Main ;-)

Golfed

class C{static int Main(string[]a){for(int i=0;){System.Console.Write(a[0][i]);System.Threading.Thread.Sleep(i++%3<1?500:100);}}}

#Ungolfed

class C
{
 static int Main(string[] a)
 {
 for (int i = 0; ;)
 {
 System.Console.Write(a[0][i]);
 System.Threading.Thread.Sleep(i++ % 3 < 1 ? 500 : 100);
 }
 }
}

Edits

  • Saved 1 byte by moving incrementing i inside of the Sleep() method instead of in the for loop. (Thanks Maliafo)
added 210 characters in body
Source Link
Mika
  • 387
  • 1
  • 12

C#, 131(削除) 131 (削除ここまで) bytes

Not much to explain. It just takes a string (wrapped in "") as argument and prints each character using the correct delay pattern. After the animation it exits with an OutOfRangeException because the loop doesn't stop after it looped over all characters. Since it's an infinite loop, that also means I can use int Main instead of void Main ;-)

Golfed

class C{static int Main(string[]a){for(int i=0;;i++i=0;){System.Console.Write(a[0][i]);System.Threading.Thread.Sleep(i%3<1i++%3<1?500:100);}}}

#Ungolfed

class C
{
 static int Main(string[] a)
 {
 for (int i = 0; ; i++)
 {
 System.Console.Write(a[0][i]);
 System.Threading.Thread.Sleep(ii++ % 3 < 1 ? 500 : 100);
 }
 }
}

Edits

  • Saved 1 byte by moving incrementing i inside of the Sleep() method instead of in the for loop. (Thanks Maliafo )

C#, 131 bytes

Not much to explain. It just takes a string (wrapped in "") as argument and prints each character using the correct delay pattern. After the animation it exits with an OutOfRangeException because the loop doesn't stop after it looped over all characters. Since it's an infinite loop, that also means I can use int Main instead of void Main ;-)

Golfed

class C{static int Main(string[]a){for(int i=0;;i++){System.Console.Write(a[0][i]);System.Threading.Thread.Sleep(i%3<1?500:100);}}}

#Ungolfed

class C
{
 static int Main(string[] a)
 {
 for (int i = 0; ; i++)
 {
 System.Console.Write(a[0][i]);
 System.Threading.Thread.Sleep(i % 3 < 1 ? 500 : 100);
 }
 }
}

C#, (削除) 131 (削除ここまで) bytes

Not much to explain. It just takes a string (wrapped in "") as argument and prints each character using the correct delay pattern. After the animation it exits with an OutOfRangeException because the loop doesn't stop after it looped over all characters. Since it's an infinite loop, that also means I can use int Main instead of void Main ;-)

Golfed

class C{static int Main(string[]a){for(int i=0;){System.Console.Write(a[0][i]);System.Threading.Thread.Sleep(i++%3<1?500:100);}}}

#Ungolfed

class C
{
 static int Main(string[] a)
 {
 for (int i = 0; ;)
 {
 System.Console.Write(a[0][i]);
 System.Threading.Thread.Sleep(i++ % 3 < 1 ? 500 : 100);
 }
 }
}

Edits

  • Saved 1 byte by moving incrementing i inside of the Sleep() method instead of in the for loop. (Thanks Maliafo )
Source Link
Mika
  • 387
  • 1
  • 12

C#, 131 bytes

Not much to explain. It just takes a string (wrapped in "") as argument and prints each character using the correct delay pattern. After the animation it exits with an OutOfRangeException because the loop doesn't stop after it looped over all characters. Since it's an infinite loop, that also means I can use int Main instead of void Main ;-)

Golfed

class C{static int Main(string[]a){for(int i=0;;i++){System.Console.Write(a[0][i]);System.Threading.Thread.Sleep(i%3<1?500:100);}}}

#Ungolfed

class C
{
 static int Main(string[] a)
 {
 for (int i = 0; ; i++)
 {
 System.Console.Write(a[0][i]);
 System.Threading.Thread.Sleep(i % 3 < 1 ? 500 : 100);
 }
 }
}

AltStyle によって変換されたページ (->オリジナル) /