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

deleted 3 characters in body
Source Link
Gymhgy
  • 8k
  • 12
  • 35

C# (Visual C# Interactive Compiler), 180 bytes

s=>{int y=new Random().Next(10)+1,i=0;for(Write($"How to{s=s[8..^1]} in {y} easy step{(y<2?"":"s")}!\n");i++<y;)Write($"\nStep {i} - {(i<y?$"Do not"+s:(char)(s[1]^32)+s[2..])}.");}

-1 byte thanks to Dominic van Essen

+13 bytes due to having to remove the "s" in steps if the random number = 1.

-2 bytes due to Julian

-2 bytes thanksdue to Neil

Try it online!

C# (Visual C# Interactive Compiler), 180 bytes

s=>{int y=new Random().Next(10)+1,i=0;for(Write($"How to{s=s[8..^1]} in {y} easy step{(y<2?"":"s")}!\n");i++<y;)Write($"\nStep {i} - {(i<y?$"Do not"+s:(char)(s[1]^32)+s[2..])}.");}

-1 byte thanks to Dominic van Essen

+13 bytes due to having to remove the "s" in steps if the random number = 1.

-2 bytes due to Julian

-2 bytes thanks to Neil

Try it online!

C# (Visual C# Interactive Compiler), 180 bytes

s=>{int y=new Random().Next(10)+1,i=0;for(Write($"How to{s=s[8..^1]} in {y} easy step{(y<2?"":"s")}!\n");i++<y;)Write($"\nStep {i} - {(i<y?$"Do not"+s:(char)(s[1]^32)+s[2..])}.");}

-1 byte thanks to Dominic van Essen

+13 bytes due to having to remove the "s" in steps if the random number = 1.

-2 bytes due to Julian

-2 bytes due to Neil

Try it online!

added 24 characters in body
Source Link
Gymhgy
  • 8k
  • 12
  • 35

C# (Visual C# Interactive Compiler), 182180 bytes

s=>{int y=new Random().Next(10)+1,i=0;for(Write($"How to{s=s[8..^1]} in {y} easy step{(y<2?"":"s")}!\n\n"\n");i++<y;)Write($"Step$"\nStep {i} - {(i<y?$"Do not"+s:(char)(s[1]^32)+s[2..])}.\n"");}

-1 byte thanks to Dominic van Essen

+13 bytes due to having to remove the "s" in steps if the random number = 1.

-2 bytebytes due to Julian

Try it online! -2 bytes thanks to Neil

Try it online!

C# (Visual C# Interactive Compiler), 182 bytes

s=>{int y=new Random().Next(10)+1,i=0;for(Write($"How to{s=s[8..^1]} in {y} easy step{(y<2?"":"s")}!\n\n");i++<y;)Write($"Step {i} - {(i<y?$"Do not"+s:(char)(s[1]^32)+s[2..])}.\n");}

-1 byte thanks to Dominic van Essen

+13 bytes due to having to remove the "s" in steps if the random number = 1.

-2 byte due to Julian

Try it online!

C# (Visual C# Interactive Compiler), 180 bytes

s=>{int y=new Random().Next(10)+1,i=0;for(Write($"How to{s=s[8..^1]} in {y} easy step{(y<2?"":"s")}!\n");i++<y;)Write($"\nStep {i} - {(i<y?$"Do not"+s:(char)(s[1]^32)+s[2..])}.");}

-1 byte thanks to Dominic van Essen

+13 bytes due to having to remove the "s" in steps if the random number = 1.

-2 bytes due to Julian

-2 bytes thanks to Neil

Try it online!

edited body
Source Link
Gymhgy
  • 8k
  • 12
  • 35

C# (Visual C# Interactive Compiler), 182 bytes

s=>{int y=new Random().Next(10)+1,i=0;for(Write($"How to{s=s[8..^1]} in {y} easy step{(y<2?"":"s")}!\n\n");i++<y;)Write($"Step {i} - {(i<y?$"Do not"+s:(char)(s[1]^32)+s[2..])}.\n");}

-1 byte thanks to Dominic van Essen

+13 bytes due to having to remove the "s" in steps if the random number = 1.

-12 byte due to Julian

Try it online!

C# (Visual C# Interactive Compiler), 182 bytes

s=>{int y=new Random().Next(10)+1,i=0;for(Write($"How to{s=s[8..^1]} in {y} easy step{(y<2?"":"s")}!\n\n");i++<y;)Write($"Step {i} - {(i<y?$"Do not"+s:(char)(s[1]^32)+s[2..])}.\n");}

-1 byte thanks to Dominic van Essen

+13 bytes due to having to remove the "s" in steps if the random number = 1.

-1 byte due to Julian

Try it online!

C# (Visual C# Interactive Compiler), 182 bytes

s=>{int y=new Random().Next(10)+1,i=0;for(Write($"How to{s=s[8..^1]} in {y} easy step{(y<2?"":"s")}!\n\n");i++<y;)Write($"Step {i} - {(i<y?$"Do not"+s:(char)(s[1]^32)+s[2..])}.\n");}

-1 byte thanks to Dominic van Essen

+13 bytes due to having to remove the "s" in steps if the random number = 1.

-2 byte due to Julian

Try it online!

added 23 characters in body
Source Link
Gymhgy
  • 8k
  • 12
  • 35
Loading
deleted 5 characters in body
Source Link
Gymhgy
  • 8k
  • 12
  • 35
Loading
deleted 55 characters in body
Source Link
Gymhgy
  • 8k
  • 12
  • 35
Loading
added 106 characters in body
Source Link
Gymhgy
  • 8k
  • 12
  • 35
Loading
added 37 characters in body
Source Link
Gymhgy
  • 8k
  • 12
  • 35
Loading
deleted 13 characters in body
Source Link
Gymhgy
  • 8k
  • 12
  • 35
Loading
added 1 character in body
Source Link
Gymhgy
  • 8k
  • 12
  • 35
Loading
added 5 characters in body
Source Link
Gymhgy
  • 8k
  • 12
  • 35
Loading
Source Link
Gymhgy
  • 8k
  • 12
  • 35
Loading

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