0

Basic C# help

I don't really get the 'area of a circle' question at the end of the basics. Any help much appreciated.

13th Jan 2022, 5:37 PM
hiccup hi
4 Answers
+ 4
Mind the spelling of the methods * it's Convert.ToDouble() * it's Console.ReadLine(), note the () * Console.WriteLine() And it needs to be radius * radius
13th Jan 2022, 6:19 PM
Lisa
Lisa - avatar
+ 1
The task is to calculate the area of a circle given the radius. Get input, convert it to numeric data type, square it, multiply with pi, output. If you need help, link your code
13th Jan 2022, 5:45 PM
Lisa
Lisa - avatar
0
Sorry, I didn't word that very well. This is the code I have so far: 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(radiusĀ² * pi); } } } The error complains about line 19 (second to last)
13th Jan 2022, 6:09 PM
hiccup hi
0
Thankyou very much! This is very different to the other C# I have been doing on unity that's all
13th Jan 2022, 7:23 PM
hiccup hi