C# Radius | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

C# Radius

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; //your code goes here radius = Convert.Todouble(Console.ReadLine()); Console.WriteLine(pi*(radius*radius)); } } } Can someone explain where is the probleme ? Thanks you

24th Apr 2022, 1:24 PM
Karl Ansel
Karl Ansel - avatar
3 Answers
+ 2
Karl Ansel Should be ToDouble
24th Apr 2022, 1:26 PM
A͢J
A͢J - avatar
+ 1
It's Convert.ToDouble()
24th Apr 2022, 1:27 PM
Lisa
Lisa - avatar
0
Ahah thanks you guys
24th Apr 2022, 1:27 PM
Karl Ansel
Karl Ansel - avatar