Hane
Hane
CC#
Created by Ewan on 10/22/2023 in #help
✅ Higher or lower game, variable wont show inside the loop using console.write ;-; help please!
What you did there is called "string interpolation", you may wanna read up on that. Other you could try for String.Format or stringbuilder - like I said, many ways to solve it. Useful read: https://learn.microsoft.com/en-us/dotnet/csharp/how-to/concatenate-multiple-strings
12 replies
CC#
Created by Ewan on 10/22/2023 in #help
✅ Higher or lower game, variable wont show inside the loop using console.write ;-; help please!
Basically, Console.WriteLine doesn't take arguments they way JS's console.log does, for example. There are multiple ways to do it, this is just the most readable.
12 replies
CC#
Created by Ewan on 10/22/2023 in #help
✅ Higher or lower game, variable wont show inside the loop using console.write ;-; help please!
try
Console.Writeline($"Guesses Remaining: {guesscount}");
Console.Writeline($"Guesses Remaining: {guesscount}");
12 replies