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

Eilam Maimoni
PLUS
Eilam Maimoni
Courses Plus Student 9,618 Points

I cant understand the program...

Its not clear what i receive from the user and where does it goes

Program.cs
using System;

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


        }
    }
}

1 Answer

Steven Parker
Steven Parker
231,084 Points

The user will type in one or more numeric digits. For example, they might type "12" (a one and a two). You can receive these using the console's "ReadLine" function.

You will store this in a variable. At some point, you'll need to convert it from a string into a number, you could possibly do that as you get it and store it as a number to begin with. Then you can easily use that number to control the print-out loop.