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#

Jiang Qian
PLUS
Jiang Qian
Courses Plus Student 5,612 Points

Can somebody help me with this question

          <p>
          ```
using System;

namespace Treehouse.FitnessFrog
{
    class Program
    {
        static void Main()
        {
          int runningTotal = 0;
          bool keepGoing = true;

          while (keepGoing)
          {
               //  Prompt the user for minutes exercised
           Console.Write("Enter how many minutes exercised:  or type \"quit\" to exit: ");
           string entry = Console.ReadLine(); 

            if(entry == "quit")
           {
             keepGoing = false;
           }
           else 
              {

               int minutes = int.Parse(entry);
               runningTotal = runningTotoal + minutes;
               Console.WriteLine("You have entered " + runningTotal + " minutes.");

              }
          }
          Console.WriteLine("Goodbye");

        }
    }
}

</p>
          ```
this thing ---->   Program.cs(29,31): error CS0103: The name `runningTotoal' does not exist in the current context                    
Compilation failed: 1 error(s), 0 warnings   , i check over and over again have no idea what when wrong.......                          
thankyou for your help!
Jiang Qian
Jiang Qian
Courses Plus Student 5,612 Points

I dont know why the question was split in two , sorry about that. i am not sure how to use this properly.

2 Answers

You made a simple syntax error when adding runningTotal to minutes. You entered runningTotoal.

Jiang Qian
PLUS
Jiang Qian
Courses Plus Student 5,612 Points

oh .....................thx............................

No prob