Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialXavier Swehla
2,852 PointsCode took too long to run
i keep getting an error saying "Bummer! Your code took too long to run." why is that? I do not understand why I would receive this error when I am not even running this code.
using System;
namespace Treehouse.CodeChallenges
{
class Program
{
static void Main()
{
int i = 0;
Console.Write("Enter the number of times to print \"Yay!\": ");
string numberOfYays = Console.ReadLine();
while (i <= int.Parse(numberOfYays));
{
Console.Write("Yay");
i = i ++;
}
}
}
}
1 Answer
Allan Clark
10,810 Pointslooks like you should just need to take the semicolon off this line
while (i <= int.Parse(numberOfYays));
Xavier Swehla
2,852 PointsXavier Swehla
2,852 Pointsthx it worked!