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 trialSami Hijazi
4,666 PointsWhy wont the console in work spaces run the app?
using System;
namespace Treehouse.FitnessFrog {
class Program
{
static void Main()
{
int runningTotal = 0;
bool keepGoing = true;
while(keepGoing)
{
//Prompt the user for the minutes exercised
Console.Write("Enter how many minutes you exercised or type \"quit\" to exit: ");
string entry = Console.ReadLine();
if (entry == "quit")
{
keepGoing = false;
}
else
{
// Add minutes exercised to total
int minutes = int.Parse(entry);
runningTotal = runningTotal + minutes;
// Display total minutes exercised to the screen
Console. WriteLine("You've entered " + runningTotal + " minutes.");
}
// Repeat until the user quits
}
Console.WriteLine("Goodbye");
}
}
}
1 Answer
Steven Parker
231,248 PointsIt worked for me, I was able to run it in a workspace.
What name does this file have, and what commands do you use to compile the code and then run it?