@nakov/

circle-area-csharp

C#

Calculate circle area by given radius in C#

fork
loading
Files
  • main.cs
  • main.exe

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.6371400827117024","path":"main.cs","file":{"path":"main.cs","content":{"asEncoding":{"base64":"dXNpbmcgU3lzdGVtOwoKY2xhc3MgQ2lyY2xlQXJlYSB7CiAgICBwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpIHsKICAgICAgICB2YXIgcmFkaXVzID0gMS4yNTsKICAgICAgICBDb25zb2xlLldyaXRlTGluZSgkIkNpcmNsZSByYWRpdXMgPSB7cmFkaXVzfSIpOwogICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKCQiQ2lyY2xlIGFyZWEgPSB7TWF0aC5QSSAqIHJhZGl1cyAqIHJhZGl1c30iKTsKICAgIH0KfQ=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
using System;

class CircleArea {
    public static void Main() {
        var radius = 1.25;
        Console.WriteLine($"Circle radius = {radius}");
        Console.WriteLine($"Circle area = {Math.PI * radius * radius}");
    }
}