+ 1

Someone knows why is it wrong?

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { const double pi = 3.14; double radius; double area; //tu código va aquí Console.WriteLine("Inserte el radio"); radius=Convert.ToDouble(Console.ReadLine()); area=pi*radius*radius; Console.WriteLine("El área es: {0}",area) } } }

6th Nov 2021, 8:16 PM
Ashelly Quezada
Ashelly Quezada - avatar
4 Respostas
+ 3
Ashelly Quezada , (the code is already corrected) .... static void Main(string[] args) { const double pi = 3.14; double radius; double area; // Console.WriteLine("Inserte el radio"); // <<< remove this line radius=Convert.ToDouble(Console.ReadLine()); area=pi*radius*radius; Console.WriteLine(area); // reduce the output to the required value only // missing semicolon ....
6th Nov 2021, 8:32 PM
Lothar
Lothar - avatar
+ 2
Ashelly Quezada , if if is a code coach exercise we can only use input or output that is demanded in the task description. please post the lesson / exercise number. thanks!
6th Nov 2021, 8:23 PM
Lothar
Lothar - avatar
0
12 Proyecto codificación área de un círculo
6th Nov 2021, 8:25 PM
Ashelly Quezada
Ashelly Quezada - avatar
0
Oh thanks, you are right.
6th Nov 2021, 8:39 PM
Ashelly Quezada
Ashelly Quezada - avatar