Files
  • main.cs
  • main.exe
main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using System;

class SizeChecker {
    public static void Main() {
        var size = decimal.Parse(Console.ReadLine());
        if (size < 0)
            Console.WriteLine($"Negative size: {size}");
        else if (size > 1000)
            Console.WriteLine($"Size too big: {size}");
        else
        {
            Console.WriteLine($"Size accepted: {size}");
            Console.WriteLine($"Area: {size * size}");
        }
    }
}