Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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(){}'''