0

Alguien me puede ayudar con el reto del área de un circulo

namespace SoloLearn { class Program { static void Main(string[] args) { const double pi = 3.14; double radius; radius = Console.Readline ("Escribe el radio" ) ; Area = Console.WriteLine( pi * radius * radius); } } }

3rd May 2022, 8:35 PM
Luis Fernando Sanchez Barrera
Luis Fernando Sanchez Barrera - avatar
2 odpowiedzi
0
It's Console.ReadLine(), there's a typo in your code. ReadLine will return a string, so you need to convert tot to double in order to assign it to radius. Remove Area =. For one thing Area is not declared, for another, it is not needed.
4th May 2022, 11:35 AM
Lisa
Lisa - avatar
0
Thanks Lisa you saved me
4th May 2022, 1:10 PM
Luis Fernando Sanchez Barrera
Luis Fernando Sanchez Barrera - avatar