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.
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
+ 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
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)
0
Thankyou very much!
This is very different to the other C# I have been doing on unity that's all