using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Project1 { class Program { public static void Main() { double first; double second; string operation; double answer; Console.WriteLine("Enter Number"); first = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Operation"); operation = Console.ReadLine(); Console.WriteLine("Enter Number"); second = Convert.ToDouble(Console.ReadLine()); while (operation != "quit") { if (operation == "+") { answer = first + second; Console.WriteLine("{0} + {1} = {2}", first, second, answer); } else if (operation == "-") { answer = first - second; Console.WriteLine("{0} - {1} = {2}", first, second, answer); } else if (operation == "*") { answer = first * second; Console.WriteLine("{0} * {1} = {2}", first, second, answer); } else if (operation == "/") { answer = first / second; Console.WriteLine("{0} / {1} = {2}", first, second, answer); } Console.WriteLine("Enter Number"); first = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Operation"); operation = Console.ReadLine(); Console.WriteLine("Enter Number"); second = Convert.ToDouble(Console.ReadLine()); } } } }

I am trying to use the answer from the calculation and use it in another calculation. Is there anyway to read the answer and compute a new answer?