This method is supposed to have a loop and return a string. How do I do that? This what I have so far. I'm new to C#.
public string BLoop()
{
for (int i = 99; i > 0; i--)
{
Console.WriteLine(string.Format("{0} bottles of beer on the wall, {0} bottles of beer.", i));
Console.WriteLine(string.Format("Take one down, pass it around, {1} bottles of beer on the wall.", i, i - 1));
Console.WriteLine();
}
}
++ I tried all the thing you suggested but I think I should rephrase the method is supposed to return a string that is printed by the main.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…