Que está mal? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Que está mal?

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; int radio = 0; //tu código va radius = Convert.Todouble (Console.Readline()); radius *= radius ; radius *= pi; Console.WriteLine(radius ); } } }

20th Jun 2021, 6:26 PM
anibal heredia
anibal heredia - avatar
15 Answers
0
Hola ya me dijeron que va con mayúscula...la d y la l...pero estoy resolviendo este ahora y no me lo aprueba y la salida está bien...int edad = Convert.ToInt32 (Console.ReadLine());
20th Jun 2021, 7:14 PM
anibal heredia
anibal heredia - avatar
0
ponga todo el codigo para revisarlo ?
20th Jun 2021, 7:16 PM
JRAMAHES
JRAMAHES - avatar
0
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Code_Coach_Challenge { class Program { static void Main(string[] args) { string name = Console.ReadLine(); double edad = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Name: "+ name); Console.WriteLine("Edad: "+ edad); } } }
20th Jun 2021, 7:17 PM
anibal heredia
anibal heredia - avatar
0
No me lo aprueba learn
20th Jun 2021, 7:19 PM
anibal heredia
anibal heredia - avatar
0
ok l see; si declaras un int cuando le des entrada lo tienes que convertir en int as well. same con los doubles tambien., pero ahi el codigo trabaja bien, el compiler no acepta string and int or double ; so do it like this escriba string primero en una linea y luego en la otra linea int
20th Jun 2021, 7:25 PM
JRAMAHES
JRAMAHES - avatar
0
// develop by anibal heredia creo que asi es mejor es lo mismo pero es more readable using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Code_Coach_Challenge { class Program { static void Main(string[] args) { string name = Console.ReadLine(); int edad = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Name: "+ name); Console.WriteLine("Edad: "+ edad); } } }
20th Jun 2021, 7:28 PM
JRAMAHES
JRAMAHES - avatar
0
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Code_Coach_Challenge { class Program { static void Main(string[] args) { string name = Console.ReadLine(); int edad = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Name: "+ name); Console.WriteLine("Edad: "+ edad); } } }
20th Jun 2021, 7:29 PM
anibal heredia
anibal heredia - avatar
0
Si pero no me lo da por aprobado
20th Jun 2021, 7:30 PM
anibal heredia
anibal heredia - avatar
0
come se llama el ejersicio ?
20th Jun 2021, 7:34 PM
JRAMAHES
JRAMAHES - avatar
0
El 5.2
20th Jun 2021, 7:35 PM
anibal heredia
anibal heredia - avatar
0
Autorización del usuario
20th Jun 2021, 7:35 PM
anibal heredia
anibal heredia - avatar
0
oh ok enter like this, the code, using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Code_Coach_Challenge{ class Program{ static void Main(string[] args){ string name = Console.ReadLine(); int n = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Name: " + name); Console.WriteLine("Age: " + n ); } } }
20th Jun 2021, 7:39 PM
JRAMAHES
JRAMAHES - avatar
0
Si gracias!!
20th Jun 2021, 7:44 PM
anibal heredia
anibal heredia - avatar
22nd Jun 2021, 4:34 AM
Sagorkhan Joy
- 1
I am assuming that you want to get the pi? do like this ; radius = Convert.ToDouble (Console.ReadLine()); radius = radius * pi; // radius *= pi; Console.WriteLine(radius );
20th Jun 2021, 7:12 PM
JRAMAHES
JRAMAHES - avatar