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 trialMatthew Benham
823 PointsPrep steps
- Declare a string to read entry
- Parse the text to int
- If clause to write yay if number of times written is less than int value (entry<=bool) Continue
- Quit the loop once number of times written equals int value--else break
These are the steps I think are needed to complete the challenge, is there anything I am missing; or is my logic off on any of these steps ?
using System;
namespace Treehouse.CodeChallenges
{
class Program
{
static void Main()
{
Console.Write("Enter the number of times to print \"Yay!\": ");
}
}
}
1 Answer
Steven Parker
231,236 PointsIt doesn't look like you've written any code yet.
The code above is what the challenge gives you to begin with. But it sounds like you've done a good job identifying the parts of the code to write - except for #3 you won't need an "if clause" .. but you will need a loop. Also you can't name a numeric variable "bool" because that's a reserved word for a different type.
So give it your best "good faith" attempt and ask again if you have any trouble, showing the code you've written.