Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace TypeBoundaries
- {
- class Program
- {
- static void Main(string[] args)
- {
- string type = Console.ReadLine();
- switch (type)
- {
- case "int":
- Console.WriteLine(int.MaxValue);
- Console.WriteLine(int.MinValue);
- break;
- case "uint":
- Console.WriteLine(uint.MaxValue);
- Console.WriteLine(uint.MinValue);
- break;
- case "long":
- Console.WriteLine(long.MaxValue);
- Console.WriteLine(long.MinValue);
- break;
- case "byte":
- Console.WriteLine(byte.MaxValue);
- Console.WriteLine(byte.MinValue);
- break;
- case "sbyte":
- Console.WriteLine(sbyte.MaxValue);
- Console.WriteLine(sbyte.MinValue);
- break;
- default:
- break;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment