C# Coding structure wrong, input (45 degrees) not outputting correct answer? : <p>I have some c# code (as below **) but I cannot seem to output the correct answer? The input is 45 (degrees) and the output should read 255.102 (meters), my answer is wrong as the output reads 413.2653. </p>

<p>I must confess that I think my code (structure) is actually wrong and not the arithmetic?</p>

<p>The whole code is as followed:</p>

<p>**</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace sums
{
    class Program
    {
        static void Main(string[] args)
        {
            //prompt the user for angle in degrees
            Console.Write("Enter initial angle in degrees: ");
            float theta = float.Parse(Console.ReadLine());


            //convert the angle from degrees to radians
            float DtoR = theta * ((float)Math.PI / 180);

            //Math.Cos
            DtoR = theta * (float)Math.Cos(theta);

            //Math.Sin
            DtoR = theta * (float)Math.Sin(theta);

            //t = Math.Sin / 9.8
            DtoR = theta / (float)9.8;

            //h = Math.Sin * Math.Sin / (2 * 9.8)
            DtoR = theta * theta / (2 * (float)9.8);

            //dx = Math.Cos* 2 * Math.Sin / 9.8
            DtoR = theta * 2 * theta / (float)9.8;

            //result
            Console.Write("Horizontal distance {0} Meters. \r\n ", DtoR, theta);
        }
    }
}
</code></pre>
