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

I don't get it I need more clues

I don;t know how to start it

Program.cs
using System;

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

        }
    }
}
Steven Parker
Steven Parker
231,108 Points

If you're totally stuck, you might want to review some of the videos, perhaps starting with Looping.

1 Answer

Think in this way:

you need to take input how many times user wants to print : for example 3

store that value in a variable : int var= int.parse(Console.ReadLine()); So you took input as a string, converted to int. Now if you loop that 3 (var) times, you will get your desired output

for (int i=1; i<=var; i++) { Console.WriteLine (""); // what ever you want to print.. }