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( );
- if (sbyte.TryParse(input, out sbyte sbytek))
- {
- Console.WriteLine("Sunny");
- }
- else if (int.TryParse(input, out int intk))
- {
- Console.WriteLine("Cloudy");
- }
- else if (long.TryParse(input, out long longk))
- {
- Console.WriteLine("Windy");
- }
- else if (decimal.TryParse(input, out decimal decimalk))
- {
- Console.WriteLine("Rainy");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement