Chessmaster

Untitled

Jun 13th, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.81 KB | None | 0 0
  1. using System;
  2. using System.Numerics;
  3.  
  4. namespace WeatherForecast
  5. {
  6.     class Program
  7.     {
  8.         static void Main()
  9.         {
  10.             try
  11.             {
  12.                 BigInteger n = BigInteger.Parse(Console.ReadLine());
  13.  
  14.                 if (n <= sbyte.MaxValue && n >= sbyte.MinValue)
  15.                 {
  16.                     Console.WriteLine("Sunny");
  17.                 }
  18.                 else if (n <= int.MaxValue && n >= int.MinValue)
  19.                 {
  20.                     Console.WriteLine("Cloudy");
  21.                 }
  22.                 else if (n <= long.MaxValue)
  23.                 {
  24.                     Console.WriteLine("Windy");
  25.                 }
  26.             }
  27.             catch (Exception exce)
  28.             {
  29.                 Console.WriteLine("Rainy",exce);
  30.             }
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment