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#

Challenge Task 1 of 3 This final code challenge will require you to use almost everything we've covered in this course.

help

Stéphane Diez
Stéphane Diez
19,350 Points

In what part you need help, ? Have you try to programm some codelines? let us see please so we can help you;)

4 Answers

You should review videos "Try code and Catch Exception" and "Looping" to understand how to code this question.

using System;

namespace Treehouse.CodeChallenges
{
    class Program
    {
        static void Main()
        {
            Console.Write("Enter the number of times to print \"Yay!\": ");
            int counter = 0;
            String times = Console.ReadLine();
            int totals = int.Parse(times);
            while (counter < totals)
            {
              Console.Write("\"Yay\"! ");
              counter += 1;
            }  

        }
    }
}

using System;

namespace Treehouse.CodeChallenges { class Program { static void Main() { Console.Write("Enter the number of times to print \"Yay!\", 5: ");

    }
}

}

wHAT IS WRONG WITH MY CODE GUYZ

Audrey Steed
Audrey Steed
1,112 Points

its
''' public static void main(){}''' not '''static void main(){}'''