View Single Post
  #2 (permalink)  
Old September 23rd, 2009, 04:47 PM
Will Will is offline
Friend of Wrox
 
Join Date: Feb 2009
Posts: 194
Thanks: 5
Thanked 3 Times in 3 Posts
Default

I noticed this as well it should be:

Code:
double firstNumber, secondNumber;
            string userName;
            Console.WriteLine("Enter your name");
            userName = Console.ReadLine();
            Console.WriteLine("welcome {0}!", userName);
            Console.WriteLine("Now give me a number:");
            firstNumber = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("now give me another number:");
            secondNumber = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("the result of subtracting {0} and {1} is {2}.", firstNumber, secondNumber,
                firstNumber - secondNumber);
            Console.ReadKey();