I have been studying c# via a fundamental book.
this is the program that i am trying to run but it gives error. I picked up this code from the book it self.
please try me how to correct these errors
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
static double readValue ( string prompt, double low, double high )
{
double result = 0;
do
{
Console.WriteLine (prompt + " between " + low + " and " + high );
string resultString = Console.ReadLine ();
result = double.Parse(resultString);
}
while ( (result < low) || (result > high) );
return result ;
}
}
}
}
Error 1 } expected
Error 2 Type or namespace definition, or end-of-file expected