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

class NestedConditionsExample {
    public static void Main() {
        var a = decimal.Parse(Console.ReadLine());
        var b = decimal.Parse(Console.ReadLine());
        if (a > 0 && b > 0 && a <= 100 && b <= 100)
        {
            if (a * b >= 5000)
                Console.WriteLine($"Large size: {a*b}");
            else if (a * b > 1000 && a * b < 5000)
                Console.WriteLine($"Middle size: {a * b}");
            else
                Console.WriteLine($"Small size: {a * b}");
        }
        else
            Console.WriteLine($"Invalid size (a={a}, b={b})");
    }
}