C# C# Basics (Retired) Perfect Wrap Up

Ankit Biswas
Ankit Biswas
280 Points

Average Problem

using System; namespace jenzabar.Average { class Progam { static void Main() {

//PROMPT USER FOR A VALUE.
 Console.WriteLine("Please enter your name!");
 string userName = Console.ReadLine();
 Console.WriteLine("Wellcome " + userName + "!");
 while(true)
 {
 double numbertotal = 0;
 int numbers = 0;
 Console.Write("Please enter a value or enter \"done\" to exit: ");
 string userInput = Console.ReadLine();

 if (userInput.toLower() == "done")
 {
    break;
 } else {
  try 
  {
    numbertotal += double.Parse(userInput); // Removed var keyword
     numbers++;
  } catch(FormatException){
   Console.WriteLine("This number is Not valid. Please try again!");
    continue;
  }
 }
  Console.WriteLine("The average of the values is: " + numbertotal / numbers);
}

} } } why I get this error ?? error CS2001: Source file `Program.
cs' could not be found
Compilation failed: 1 error(s), 0 w arnings

Steven Parker
Steven Parker
170,377 Points

This appears to be a duplicate of your previous question.

But to facilitate analysis, make a snapshot (note: not "screenshot") of your workspace and post the link to it here.