Files
c-sharp/Negyszog/Negyszog.cs
2022-04-29 11:16:40 +02:00

28 lines
581 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Negyszog {
public class Negyszog {
public double oldal { get; set; }
public Negyszog(double oldal) {
this.oldal = oldal;
}
public double Kerulet() {
return 4.0 * oldal;
}
public double Terulet() {
return oldal*oldal;
}
public double Atlo() {
return Math.Round(Math.Sqrt(oldal*oldal * 2) * 100.0) / 100.0;
}
}
}