0
Area of a Circle
I need help pls
16 Respuestas
+ 11
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;
//your code goes here
radius = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(pi*radius*radius);
}
}
}
Hope, this will help you.
+ 3
visph
I appreciate your effort for helping everyone. But, we need to see what they have done so far.
+ 1
Show your attempt. Where is your code?
+ 1
Alice Petey , giving ready answers to the task prevents learners from learning syntaxes & understanding logic & concepts behind the given task.
Yes, absolutely agree with you visph.
0
circle area = PI * radius * radius
0
I just give the circle area formula... I guess that's not the point of the task, as it is a well known formula, even by childs... I rather believe that the point of the task is to apply this formula in a program ^^
0
Oh thank you im learning c# but sometimes is very confused
0
that's why I was trying to help by giving you the mathematic formula, to let you concentrate on code rather on loosing time to get the good maths ;P
0
visph
Exactly, my point was same as yours. It's a well know formula even with just one Google search we can find it easily.
We all stuck at some point while learning. It's just that when we do some research and try to solve with small steps (we learn more) :) 🤷
0
Shivani 📚✍ [Exams] sure, that's why I believe that we must concentrate on coding skills rather on maths skills when learning programation languages ;)
0
Alice Petey it would help to solve, but it wouldn't help to learn ^^
0
Try this =>
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());
double area = pi * radius * radius;
Console.WriteLine(area);
}
}
}
- 1
use a circle area equation and mix that with the some input.
- 2
Jajaja thank you
- 2
please don't upload code.
- 3
I don't think you are talking about the syntax.
So Area of circle = Pi*radius*radius.
Pi=22/7;