title: Problems in c# code (Noob)
body: <p>My program closes before giving results and the age differences are wrong.</p>
  
  <p>I've checked everywhere and they said use <code>Console.Read()</code>, <code>Console.ReadLine()</code>, or <code>Console.ReadKey()</code> which I did before they even said that but it still doesn't work. Someone else said use <code>System("PAUSE")</code> but that just gives me an error.</p>
  
  <p>It also said when I entered 21 as an age that 21 - 12 = 38???</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace ConsoleApplication1
  {
      class Program
      {
  
          static String name;
          static int age;
  
          static void Main(string[] args)
          {
              Console.WriteLine("Welcome to the application!");
              Console.Write("What's your name? ");
  
              // Setting the name string to the line read from the console.
              name = Console.ReadLine();
  
              Console.Write("\n So how old are you " + name + "? ");
  
              // Doing the same thing we did last time with the age.
              age = Console.Read();
  
              compareAges();
              Console.Read();
          }
  
          static void compareAges()
          {
              if(age &lt; 12)
              {
                  Console.WriteLine("I'm older than you! I'm 12.");
                  Console.ReadLine();
              }
              else if(age == 12)
              {
                  Console.WriteLine("We're the same age!!!");
                  Console.ReadLine();
              }
              else
              {
                  int ageDifference = age - 12;
                  Console.WriteLine("You're " + ageDifference + " years older than me!");
                  Console.ReadLine();
              }
          }
      }
  }
  </code></pre>
  
  <p>P.S. Sorry if I made some indention errors here but the actual code's indention is correct.</p>