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 trial

C# C# Basics (Retired) Perfect Final

it worked fine... NVM Guys, I was clicking on preview instead of submit.... Needed more sleep...

update

it worked fine... NVM Guys, I was clicking on preview instead of submit.... Needed more sleep...

******** get sleep before posting questions*********

So I took my code into visual studio community 2017, complied and ran it... it worked fine... I run it in the treehouse console test area..and it bombs.. says the code didnt complete enough times... IDK whats going on..

but this works fine in VSCommunity 2017

Program.cs
using System;

namespace Treehouse.CodeChallenges
{
    class Program
    {
        static void Main()
        {
            Console.Write("Enter the number of times to print \"Yay!\": ");
            var response = Console.ReadLine();
            int entry = Int32.Parse(response);
            var i = 0;
            while (i < entry)
            {
                Console.WriteLine("\"Yay!\"");
                i++;
            }

        }
    }
}

1 Answer

Steven Parker
Steven Parker
231,269 Points

That's odd, because I copied the code shown here and pasted it directly into the challenge and it passed task 1.

However — I don't think the outputs are supposed to have quote marks. Try making your output be “Yay!” without the quotes as part of the string.

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

I also get the same thing when I put it into task 1. That being said, task two requires some error handling which is missing entirely from this code. I'm not sure exactly which step you're working on.

it worked fine... NVM Guys, I was clicking on preview instead of submit.... Needed more sleep...

******** get sleep before posting questions*********

sorry, but thanks for the response