Ask coding questions

← Back to all posts
Rock Paper Scissors
Gillyman16 (0)

I would like to know if anyone could think of a way to shorten the code down.

Comments
hotnewtop
Vandesm14 (2728)

Use string substitutions:

String s1 = "Scissors";
String s2 = "WINS";
/* ... */
Console.WriteLine(s1);
Console.WriteLine("Rock to " + s1 + "the you " + s2);

Please mark this as answered if I helped your problem 👍

Yusuf_A (0)

it didn't even wrk