(Solved)if a variable is already declare as double why should i convert it?
Hello everyone! I just have a question about 1st code project . Why should I convert radius to double if it is already declare as double? does it mean I have to do it for the reason of user input in Console.ReadLine(); ? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Test { internal class Program { static void Main(string[] args) { const double pi = 3.14; double radius; radius = Convert.ToDouble(Console.ReadLine()); double r = radius; double area = pi * r * r; Console.WriteLine(area); } } } edit: Thanks everyone for your help =)