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 trialPEI HUNG KUO
Python Web Development Techdegree Student 1,110 PointsI don't get it I need more clues
I don;t know how to start it
using System;
namespace Treehouse.CodeChallenges
{
class Program
{
static void Main()
{
Console.Write("Enter the number of times to print \"Yay!\": ");
}
}
}
1 Answer
Amit Ghosh
9,314 PointsThink 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.. }
Steven Parker
231,236 PointsSteven Parker
231,236 PointsIf you're totally stuck, you might want to review some of the videos, perhaps starting with Looping.