+ 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) } } }
4 Réponses
+ 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
....
+ 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!
0
12 Proyecto codificación área de un círculo
0
Oh thanks, you are right.