Alguien me puede ayudar con el reto del área de un circulo | Sololearn: Learn to code for FREE!

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); } } }

5/3/2022 8:35:17 PM

Luis Fernando Sanchez Barrera

2 Answers

New Answer

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.

0

Thanks Lisa you saved me