Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Prob_5_Weather_Forecast
- {
- class Prob_5_Weather_Forecast
- {
- static void Main(string[] args)
- {
- string input = Console.ReadLine( );
- try
- {
- sbyte.Parse(input);
- Console.WriteLine("Sunny");
- }
- catch (Exception)
- {
- try
- {
- int.Parse(input);
- Console.WriteLine("Cloudy");
- }
- catch (Exception)
- {
- try
- {
- long.Parse(input);
- Console.WriteLine("Windy");
- }
- catch (Exception)
- {
- try
- {
- decimal.Parse(input);
- Console.WriteLine("Rainy");
- }
- catch (Exception)
- {
- Console.WriteLine("");
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement