-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
36 lines (35 loc) · 855 Bytes
/
Program.cs
File metadata and controls
36 lines (35 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace korok
{
class Kor
{
public double Sugar { get; set; }
public double Ter()
{
double Terulet =Math.Round( Sugar * Sugar * Math.PI,2);
return Terulet;
}
public double Ker()
{
double Kerulet =Math.Round( 2 * Sugar * Math.PI,2);
return Kerulet;
}
public Kor(double sugar)
{
Sugar = sugar;
}
}
class Program
{
static void Main(string[] args)
{
var k1 = new Kor(5);
Console.WriteLine($"A kör kerülete:{k1.Ker()}, a kör területe:{k1.Ter()}" );
Console.ReadKey();
}
}
}